-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential X-Forwarded-For parsing improvements #1453
Comments
Hello @ttt733,
|
Hello @ttt733, It's done on // [...]
app.Run(...,
iris.WithRemoteAddrPrivateSubnet("192.168.0.0" /*start*/, "192.168.255.255" /* end */),
iris.WithRemoteAddrPrivateSubnet("10.0.0.0", "10.255.255.255"),
) Thank you a lot for this issue, it was a real improvement that I've never happen to see anywhere else before. |
Former-commit-id: e5fde988eda9bf582b04285a1c77ba123910a699
The only thing I could request further on this issue is supporting CloudFlare's Client IP headers by option.
Or for Enterprise users:
Documentation: https://support.cloudflare.com/hc/en-us/articles/206776727-What-is-True-Client-IP- |
The default list is empty by-default, however
Lines 806 to 820 in 0f5ec75
Line 356 in 0f5ec75
|
Thank you! I would definitely say this is solved then :). |
I noticed a couple of potential issues which might be hard to debug, for people using RemoteAddr() functions.
context.go
should care about string case. (Some people might expect to be able to configureX-FORWARDED-FOR
rather thanX-Forwarded-For
and expect the same functionality.)The text was updated successfully, but these errors were encountered: