renyineng opened a new issue #1100: bug: 浏览器发送 OPTIONS请求,无法匹配header, CURL请求没问题 URL: https://github.com/apache/incubator-apisix/issues/1100 ### Issue description 浏览器发送 OPTIONS请求,无法匹配到header(无法读取到),导致了404, 发送 CURL请求没问题 ### Environment * apisix version v1.0 * OS: centos7 ### Minimal test code / Steps to reproduce the issue 1.新增路由 ``` curl http://127.0.0.1:80/apisix/admin/routes/1 -X PUT -d ' { "uri": "/shop/auth/login", "methods": ["OPTIONS","POST"], "vars": [ ["http_k_project", "shop"] ], "service_id": "1" } ``` 2. 使用 vue axios 发送post请求,因为涉及跨域,所以先发送了OPTIONS请求,则直接404了 3. 使用curl测试 正常 `curl -I -X OPTIONS https://api.xxx.com/shop/auth/login -H "Host:api.xxx.com" -H "Content-Type:application/json" -H "Accept:application/json" -H "K-Project:shop"`
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services