Handling 302 redirects for login #1591
-
We are trying to use YARP in front of an ASP.NET WebForms app using Identity and having an issue with redirect responses (302) using the 'internal' If a user isn't logged in, it sets Scenario:
If we navigate directly to the correct page, e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The use of a proxy will not be transparent to the back-end site, and the site needs to be aware of the proxy. The proxy will inform the destination of the original connection information using a series of x-forwarded-* headers. |
Beta Was this translation helpful? Give feedback.
The use of a proxy will not be transparent to the back-end site, and the site needs to be aware of the proxy. The proxy will inform the destination of the original connection information using a series of x-forwarded-* headers.
ASP.NET Core has a middleware that will update the context values based on these headers - https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-6.0. I think the login components will be using the context values so this should wire it up correctly, assuming you add the middleware on the backend site.