4.0已经删除了以下属性,所以这样不行
services.AddIdentityServer(options =>
{
//4.0已经删除此属性
options.PublicOrigin = "https://my.id.server";
});
正确的是直接使用ASP.NET Core转发标头方法:
app.Use(async (ctx, next) =>
{
ctx.SetIdentityServerOrigin("https://www.baidu.com");
await next();
});
或者
app.Use(async (ctx, next) =>
{
ctx.Request.Scheme = "https";
ctx.Request.Host = new HostString("www.baidu.com");
await next();
});
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/270912.html