[英]Identity Server Redirect URL for an Application behind reverse proxy
Question is the following: we have an ASP.NET Core application which sits behind nginx, with public url https://public and private url https://private. Question is the following: we have an ASP.NET Core application which sits behind nginx, with public url https://public and private url https://private. When the user hits an application, there is a login redirect to Identity Server, which contains private url as redirect url.
当用户点击应用程序时,会有一个登录重定向到 Identity Server,其中包含私有 url 作为重定向 url。 Can anyone suggest how to rewrite this url to be a public one?
谁能建议如何将这个 url 重写为公共的?
Regards问候
Actually some days ago I had the same issue with identityserver.实际上几天前我在身份服务器上遇到了同样的问题。 I ordert to work quite different depending on the version of identityserver.
根据身份服务器的版本,我的工作方式完全不同。 Until 4.0 version you can set
直到 4.0 版本你可以设置
Public origin = your public url公共来源 = 你的公共 url
From 4.0 you have to setup your proxy in order to pass X forwarded headers.从 4.0 开始,您必须设置代理才能传递 X 转发的标头。
In order to work you need to use dotnet Middleware described in the docs https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1为了工作,您需要使用文档https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1中描述的 dotnet Middleware
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.