-
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(response-rewrite): support adding header #7794
Merged
Merged
Conversation
This file contains 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
See https://lists.apache.org/thread/bxl0sn1qb5fchvnynz7b8sst9r07cyqm Signed-off-by: spacewander <spacewanderlzx@gmail.com>
soulbird
reviewed
Aug 26, 2022
soulbird
reviewed
Aug 26, 2022
| headers.add | array | 否 | | | 添加新的响应头。格式为 `["name: value", ...]`。这个值能够以 `$var` 的格式包含 NGINX 变量,比如 `$remote_addr $balancer_ip`。 | | ||
| headers.set | object | 否 | | | 改写响应头。格式为 `{"name": "value", ...}`。这个值能够以 `$var` 的格式包含 NGINX 变量,比如 `$remote_addr $balancer_ip`。 | | ||
| headers.remove | array | 否 | | | 移除响应头。格式为 `["name", ...]`。 | | ||
| headers | object | 否 | | | 返回给客户端的 `headers`,这里可以设置多个。头信息如果存在将重写,不存在则添加。想要删除某个 header 的话,把对应的值设置为空字符串即可。 | |
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.
repeated?
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
soulbird
reviewed
Aug 26, 2022
tokers
reviewed
Aug 26, 2022
soulbird
approved these changes
Aug 29, 2022
tzssangglass
approved these changes
Aug 29, 2022
tokers
approved these changes
Aug 29, 2022
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.
See https://lists.apache.org/thread/bxl0sn1qb5fchvnynz7b8sst9r07cyqm
Signed-off-by: spacewander spacewanderlzx@gmail.com
Description
Fixes #7776
Checklist