aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

OverrideHeaderMiddleware doesn't handle X-Forwarded-For inside a docker container #361

Closed lmcarreiro closed 6 years ago

lmcarreiro commented 6 years ago

Test with Fiddler and Docker for Windows, running inside Visual Studio it works fine, I get the RemoteIpAddress with the value from the X-Forwarded-For header. If I run inside docker, I get something like this: ::ffff:172.23.112.1

I'm using ASP.NET Core 2.2.0-preview1-35029

Tratcher commented 6 years ago

Duplicate of https://github.com/aspnet/BasicMiddleware/issues/358 which was fixed in preview3. A workaround was also added to the docs: https://github.com/aspnet/Docs/pull/8432,