aspnet / Proxy

[Archived] Proxy library for ASP.NET Core. Project moved to https://github.com/aspnet/AspLabs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redirect behavior

Peperud opened this issue · comments

Thinking out loud...

  1. The default way for a reverse proxy to handle redirects should be to let them go back to the client. By default HttpClient does not do that.
  2. While passing redirect responses back to the client, the proxy should be cleaver enough to detect which URLs point to the upstream server behind the proxy and change them to point to the proxy instead (otherwise the client will bypass the proxy when following the redirect).
  3. If a HttpClientHandler with AllowAutoRedirect = false is passed in the options, the redirects seem to go through, however the 301 responses reach the client unaltered and the proxy is bypassed on the next request.

This issue was moved to aspnet/Home#2502