chenqing24 edited a comment 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' == ctx.var.request_method 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: [email protected] With regards, Apache Git Services
