-
Notifications
You must be signed in to change notification settings - Fork 4.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
IP Restriction and Rate-Limiting should make X-Forwarded-For parsing configurable #2020
Comments
@thefosk, if #2236 is about to be merged, then this changes quite a bit. Before merging we are by default running this kind of config (trust all IPv4):
After this patch all of these are configurable, but the default config will be (trust none — aka unconfigured Nginx default):
On production I think it is best to use currently something like this:
Now we do have I think those plugins should be configurable to use other Nginx variables than the default |
@bungle is this done now that your X-F-F work is merged in? |
@p0pr0ck5, as far as it can be considered fixed by that? No sure if there is still need for overriding this per API basis, though. But that easily leads to a question that whether every plugin that wants to access client IP should have some configuration variable to do so. I am against adding something like |
We are using the ngx_http_realip_module to properly handle the real client IP address and parse it from the
X-Forwarded-For
header if it exists.This behavior works fine in most use-cases, but there are some plugins which should make it configurable for security reasons:
IP Restriction, Rate-Limiting and Response Rate-Limiting plugins should support a
config.disable_forwarded_for
if the real IP address should be used always (ignoring theX-Forwarded-For
header).The text was updated successfully, but these errors were encountered: