Safari turns Simple Cors Request into Preflight after 302 redirect

女生的网名这么多〃 提交于 2019-12-10 17:34:17

问题


I found out that following issue occurs on safari via Javascript, jQuery Ajax:

  1. I make a cors simple request using GET
  2. Server responses with 302
  3. Safari follows redirect but uses OPTIONS instead of GET as method, so it does a preflight request

I would expect that step 3 would also invoke a simple request using GET, which is exactly how it is done in Chrome and Firefox.

The problem is that the server who responses to the request after step 3 can not handle requests with method OPTIONS and therefor fails with status "Method Not Allowed". Since i have no influence on the server side, i need to force either to not follow the redirect automatically and do it manually instead or somehow tell safari not to switch to OPTIONS.

Is there any way to do one of those options?

来源:https://stackoverflow.com/questions/30757449/safari-turns-simple-cors-request-into-preflight-after-302-redirect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!