Response for preflight is invalid (redirect)

1,707 views
Skip to first unread message

김영철

unread,
May 10, 2017, 3:42:45 AM5/10/17
to Shaka Player Users
Hi,

Have you ever had the same problem with the below error :

XMLHttpRequest cannot load http://xxxxxxxx. Response for preflight is invalid (redirect)

So, I set up the additional header parameter as like :

 request.headers['Access-Control-Allow-Origin'] = '*';
  request.headers['Access-Control-Max-Age'] = '3600';
  request.headers['Content-Type'] = 'application/json;charset=UTF-8';
  request.headers['Access-Control-Allow-Methods'] = 'GET,POST,OPTIONS,' +
      'PUT,DELETE';
  request.headers['Access-Control-Allow-Headers'] = 'Content-Type,' +
      'Origin,Accept,X-Requested-With,Access-Control-Request-Method,' +
      'Access-Control-Request-Headers,Authorization,Access-Control-Allow-Origin';

But, It did not work.

How can I fix this kind of problem? 
Please share your experience.

Thanks

Joey Parrish

unread,
May 12, 2017, 3:03:20 PM5/12/17
to Shaka Player Users
Hello,

I have never run into this, but it appears to be caused by a redirect on the preflight request.  I see two options:

1. Avoid preflight (depends on what the request is, may not be feasible)
2. Fix the server so that it does not redirect on preflight (OPTIONS) requests (depends on you controlling the server)

Can you provide any details on how you got this error?  What kind of request is it (license, manifest, segment)?

Thanks,
Joey


--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/08260906-4264-4931-a599-4c0505ecce67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages