-
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
feat(real-ip): implement the first version #4813
Conversation
Signed-off-by: spacewander <[email protected]>
|
||
| Name | Type | Requirement | Default | Valid | Description | | ||
| --------- | ------------- | ----------- | ---------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| source | string | required | | Any Nginx variable like `arg_realip` or `http_x_forwarded_for`| dynamically set the client's IP and port in APISIX's view, according to the value of variable. If the value doesn't contain a port, the client's port won't be changed. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also hint to the users that if the address format is not correct, the real-ip
plugin will just let it go and don't change the client address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in the new commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in the new commit
Signed-off-by: spacewander <[email protected]>
docs/en/latest/plugins/real-ip.md
Outdated
|
||
It works like Nginx's `ngx_http_realip_module`, but is more flexible. | ||
|
||
This plugin requires APISIX to run on [APISIX-OpenResty](../how-to-build.md#step-6-build-openresty-for-apache-apisix). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a note
is better
Signed-off-by: spacewander <[email protected]>
Signed-off-by: spacewander [email protected]
What this PR does / why we need it:
Pre-submission checklist: