Safari turns Simple Cors Request into Preflight after 302 redirect

607 views Asked by At

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?

0

There are 0 answers