Closed
Description
openedon Jan 18, 2022
- List of NuGet packages and version that you are using:
- Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the
*.csproj
file): - Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
Describe the bug
A clear and concise description of what the bug is.
X-Forwarded-For
is specified with an IPv6 IP address and we return just the first 4 characters.
X-Forwarded-For : 180.60.62.8:36608
becomes180.60.62.8
X-Forwarded-For : 2400:4151:f82:3000:8d8:f068:5c34:824, 147.243.22.167:52155
becomes2400
There is an inconsistency between the ASP NET and .NET Core implementations:
- Core
- AspNet
One uses LastIndexOf and other other uses IndexOf to find the :
character.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment