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

Behind IIS had to remove Request.PathBase from URI in ProxyMiddleware.cs

FritzHerbers opened this issue · comments

We have two Webservices. The first APP1 serves the wwwroot, a WEBAPI api/app1/.. and the proxy to the second Webservice (old ASP.NET) api/app2/..., with MapWhen (httpContext.Request.Path.Value.StartsWith == /api/app2/).

Everything works fine without IIS.

In IIS we use https://server/APP1 as base URI.
Requests for the second Webservice get a 400 HTTP error, received from the second Webservice.

After removing Request.PathBase from URI in ProxyMiddleware.cs everything worked.

Am i doing something wrong?

Right now Proxy forwards requests as is, including PathBase, Path, and QueryString, and almost all of the headers. This needs to be much more customizable.

This issue was moved to aspnet/Home#2500