-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(real-ip): implement the first version #4813
Conversation
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
|
||
| 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 <spacewanderlzx@gmail.com>
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 <spacewanderlzx@gmail.com>
Signed-off-by: spacewander spacewanderlzx@gmail.com
What this PR does / why we need it:
Pre-submission checklist: