You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "840963657 (via GitHub)" <gi...@apache.org> on 2023/04/03 06:18:40 UTC
[GitHub] [apisix] 840963657 opened a new issue, #9223: bug: response-rewrite : The format validation for headers.add is unreasonable.
840963657 opened a new issue, #9223:
URL: https://github.com/apache/apisix/issues/9223
### Current Behavior
response-rewrite plugin Configuration Information:
"plugins": {
"response-rewrite": {
"headers": {
"add": [
"X-Server-test:a"
]
}
}
}
error Information
{"error_msg":"failed to check the configuration of plugin response-rewrite err: property \"headers\" validation failed: object matches none of the required"}
### Expected Behavior
The parameter value should be able to contain a single character.
I think this regular expression is incorrect:
response-rewrite.lua:55
add = {
type = "array",
minItems = 1,
items = {
type = "string",
-- "Set-Cookie: <cookie-name>=<cookie-value>; Max-Age=<number>"
pattern = "^[^:]+:[^:]+[^/]$"
}
### Error Logs
{"error_msg":"failed to check the configuration of plugin response-rewrite err: property \"headers\" validation failed: object matches none of the required"}
### Steps to Reproduce
add response-rewrite plugin;
Configure the headers.add value to be a single character
### Environment
- APISIX version (run `apisix version`):3.2
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] kayx23 commented on issue #9223: bug: response-rewrite : The format validation for headers.add is unreasonable.
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #9223:
URL: https://github.com/apache/apisix/issues/9223#issuecomment-1522651644
Testing with `Cache-Control: no-cache`

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 closed issue #9223: bug: response-rewrite : The format validation for headers.add is unreasonable.
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed issue #9223: bug: response-rewrite : The format validation for headers.add is unreasonable.
URL: https://github.com/apache/apisix/issues/9223
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] kayx23 commented on issue #9223: bug: response-rewrite : The format validation for headers.add is unreasonable.
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #9223:
URL: https://github.com/apache/apisix/issues/9223#issuecomment-1522645992

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org