-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Export engine.prepareTrustedCIDRs()
#2814
Comments
engine.prepareTrustedCIDRs()
engine.prepareTrustedCIDRs()
engine.prepareTrustedCIDRs()
engine.prepareTrustedCIDRs()
Even if #2791 is the accepted answer, I don't feel it should be closed until we have a commit sha or release to test this "fixed" functionality with the set function. |
I'm using gin from an AWS Lambda. It works very well, via the adapter, but I bumped into this table edge pretty hard this morning and spent time looking into how to turn this off because it provides no value in my scenario, and actively gets in the way and slows things down. I'm not a fan of this feature. To me its dead code, tbh. Maybe Give us a ClientIPResolver interface instead, or something? Tie that in with any hosting provider specific modes, etc., seems best. At least then the code is open for extension but closed for modification, and hence is more SOLID and DRY. |
Summary
Many people don't use
Run()
to start their gin applications! This meansTrustedProxies
is never parsed, asprepareTrustedCIDRs
is only ever called from this func.There are a number of us whom host gin behind an nginx proxy_pass or apache reverse_proxy and would like to see something other than
127.0.0.1
in our request logs, among other facilities which require the ability to know the true Remote IP Address.Details
Please see the quoted code from the repository:
gin.go L323:L367
Related Issue(s)
#2697
#2723
#2791
#2809
The text was updated successfully, but these errors were encountered: