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


With regards,
Apache Git Services

Reply via email to