How to allow cross-domain requests in Safari?

后端 未结 1 728
囚心锁ツ
囚心锁ツ 2021-01-07 10:31

I have webapp I run from localhost (because of debugging) and it makes cross-domain AJAX requests. I can easily set flag for Chrome \"--disable-web-security\" and the webapp

相关标签:
1条回答
  • 2021-01-07 11:08

    Solution is to set a header Access-Control-Allow-Origin: * on the server.

    In PHP it's easy like this:

    header("Access-Control-Allow-Origin: *");
    

    Credit for the answer goes to Brain2000, thanks for suggesting a link in your comment.

    0 讨论(0)
提交回复
热议问题