-
Notifications
You must be signed in to change notification settings - Fork 534
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
fix: use remote address instead of client ip #1831
Conversation
Deploy preview for apisix-dashboard ready! Built with commit 5c52a25 |
Codecov Report
@@ Coverage Diff @@
## master #1831 +/- ##
==========================================
- Coverage 71.62% 61.81% -9.82%
==========================================
Files 172 47 -125
Lines 6119 3177 -2942
Branches 711 0 -711
==========================================
- Hits 4383 1964 -2419
+ Misses 1487 899 -588
- Partials 249 314 +65
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
Now, we use the gin's context.ClientIP.This function will parse the IP from the header
X-Forwarded-For
andX-Real-Ip
which will bypass the ipfilter middleware.
What changes will this PR take into?
Use remote address instead of client ip.
Checklist: