Rewriting URLs in discovery page (.well-known/openid-configuration)

拜拜、爱过 提交于 2019-12-30 11:24:08

问题


I have IdentityServer4 running behind a load balancer that redirects https calls to http resources. This means that my IdentityServer will be running on http but will need to show https URLs in it's discovery page (.well-known/openid-configuration).

What's the most elegant way to transform http urls on this page to https?


回答1:


Set the PublicOrigin option (see docs).

services.AddIdentityServer( options => 
    options.PublicOrigin = "https://foo.bar.com" 
)
    .AddSigningCredential(...)
    .AddValidationKey(...)
    .AddInMemoryIdentityResources(...)
    .AddInMemoryClients(...)
    .AddProfileService<...>();


来源:https://stackoverflow.com/questions/49657754/rewriting-urls-in-discovery-page-well-known-openid-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!