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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to