feat(real-ip): implement the first version#4813
Merged
Merged
Conversation
Signed-off-by: spacewander <[email protected]>
spacewander
marked this pull request as ready for review
August 12, 2021 09:41
tokers
reviewed
Aug 12, 2021
|
|
||
| | 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. | |
Contributor
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
Added in the new commit
Member
Author
There was a problem hiding this comment.
Added in the new commit
tzssangglass
approved these changes
Aug 12, 2021
Signed-off-by: spacewander <[email protected]>
membphis
reviewed
Aug 13, 2021
|
|
||
| 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). |
membphis
approved these changes
Aug 13, 2021
Signed-off-by: spacewander <[email protected]>
tokers
approved these changes
Aug 13, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: spacewander [email protected]
What this PR does / why we need it:
Pre-submission checklist: