简体   繁体   English

反向代理后的应用程序的身份服务器重定向 URL

[英]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.

相关问题 设置Identity Server 4反向代理 - Setup Identity Server 4 Reverse proxy Blazor 服务器端在反向代理 404 后面 - Blazor server side behind reverse proxy 404 无法调用 traefik 反向代理后托管的 grpc 服务器 - Unable to call grpc server hosted behind traefik reverse proxy 在反向代理后面使用 Azure AD 身份验证的 ASP.NET Core 应用程序设置了错误的 redirect_uri - ASP.NET Core app with Azure AD authentication behind a reverse proxy is setting the wrong redirect_uri 当 Azure APP 服务位于像 NGINX 这样的反向代理后面时,如何更改 MSAL 回复 URL? - How do you change the MSAL Reply URL when the Azure APP Service is behind a reverse proxy like NGINX? 在 nginx 反向代理后面设置 ASP NET Core MVC 应用程序的虚拟路径 - Set Virtual Path to ASP NET Core MVC Application behind nginx reverse proxy nginx 反向代理后面的故障排除应用程序,因为 POST/PUT 请求以错误 400(错误请求)回复 - troubleshooting application behind nginx reverse proxy, as POST/PUT requests are replied with Error 400 (Bad Request) 如何在应用程序网关后面进行基于路径的反向代理应用程序服务? - How to path-based reverse proxy app service behind application gateway? 在反向代理后面部署 IdentityServer4 - Deploying IdentityServer4 behind reverse proxy 托管在 iss 中后,客户端应用程序未重定向到 Identity Server 4 - Client Application not Redirect to Identity Server 4 after hosted in iss
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM