Cross-Origin Request Headers(CORS) with PHP headers

后端 未结 11 1349
情书的邮戳
情书的邮戳 2020-11-21 11:13

I have a simple PHP script that I am attempting a cross-domain CORS request:



        
11条回答
  •  北恋
    北恋 (楼主)
    2020-11-21 11:57

    Many description internet-wide don't mention that specifying Access-Control-Allow-Origin is not enough. Here is a complete example that works for me:

     'OK',
        ];
        print json_encode($ret);
    

提交回复
热议问题