You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/23 10:45:52 UTC
[GitHub] [incubator-apisix] chenqing24 commented on issue #1100: bug: 【CORS Problem】Browser auto sends OPTIONS request, cannot match header, CURL request is fine
chenqing24 commented on issue #1100: bug: 【CORS Problem】Browser auto sends OPTIONS request, cannot match header, CURL request is fine
URL: https://github.com/apache/incubator-apisix/issues/1100#issuecomment-602517208
Here is my solution for your reference:
```lua
function _M.rewrite(conf, ctx)
-- 在开头先判断,如果是游览器为了跨域而发的OPTIONS,直接返回OK
if 'OPTIONS' == action then
return 200
end
……
end
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services