totemofwolf opened a new issue #4095:
URL: https://github.com/apache/apisix/issues/4095


   ### Issue description
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): APISIX/2.5
   * OS (cmd: `uname -a`): 2.5-alpine
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4
   * apisix-dashboard version, if have: 2.5
   
   ### Minimal test code / Steps to reproduce the issue
   
   1. request:
   
   ```
   # request:
   
   curl 'http://pilot.x.work/apisix/admin/routes/350558925461914554' \
     -X 'PUT' \
     -H 'Connection: keep-alive' \
     -H 'Accept: application/json' \
     -H 'DNT: 1' \
     -H 'Authorization: ' \
     -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36' \
     -H 'Content-Type: application/json;charset=UTF-8' \
     -H 'Origin: http://pilot.x.work' \
     -H 'Referer: http://pilot.x.work/routes/list' \
     -H 'Accept-Language: zh-CN,zh;q=0.9' \
     --data-raw '{
       "uris":[
           "/*"
       ],
       "name":"https_mapi-x",
       "desc":"https://x";,
       "priority":10,
       "hosts":[
           "x"
       ],
       "vars":[
           [
               "scheme",
               "==",
               "https"
           ]
       ],
       "plugins":{
           "cors":{
               "allow_credential":true,
               "allow_headers":"*",
               "allow_methods":"*",
               "allow_origins":"https://x";,
               "expose_headers":"*",
               "max_age":-1
           }
       },
       "upstream_id":"350558615033086906",
       "status":1
   }
     ' \
     --compressed \
     --insecure
   ```
   
   
   2.response
   
   ```
   # curl the route with response:
   
   HTTP/2 404
   content-type: text/plain; charset=utf-8
   content-length: 18
   date: Wed, 21 Apr 2021 06:43:25 GMT
   server: APISIX/2.5
   access-control-allow-origin: *
   access-control-allow-methods: *
   access-control-max-age: 5
   access-control-expose-headers: *
   access-control-allow-headers: *
   
   ```
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   
   ### What's the expected result?
   


-- 
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.

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


Reply via email to