twitchax / AspNetCore.Proxy

ASP.NET Core Proxies made easy.
MIT License
525 stars 83 forks source link

Is there a cleaner way to fallback to initial Host? #49

Closed bnssoftware closed 4 years ago

bnssoftware commented 4 years ago

If a host falls through and doesn't need to be proxied based on set rules, rather than having to do this:

return "https://" + context.Request.Host.Value;

Can there be a cleaner way to just fallback to the initial request host?

twitchax commented 4 years ago

This library is just a middlware, and you can place other routes in the middleware chain before this middleware.

You should add whatever routes/rules that you want the host to handle as Use middleware before the UseProxy or RunProxy middleware.