ABP使用OIDC模块提示 "Openiddict with dotnet core 8 giving the errors as "this server only accepts HTTPS requests."?

提示内容如下:

{
  "error": "invalid_request",
  "error_description": "This server only accepts HTTPS requests.",
  "error_uri": "https://documentation.openiddict.com/errors/xxx"
}

禁用https请求即可

public override void PreConfigureServices(ServiceConfigurationContext context)
{
     PreConfigure<OpenIddictBuilder>(builder =>
     {
        //禁用https请求
        builder.AddServer(options => { options.UseAspNetCore().DisableTransportSecurityRequirement(); });
     }); 
}

 

posted @ 2024-08-12 15:20  韩梦芫  阅读(21)  评论(0编辑  收藏  举报