Cross-Origin Request Headers(CORS) with PHP headers

后端 未结 11 1350
情书的邮戳
情书的邮戳 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:47

    this should work

    header("Access-Control-Allow-Origin: *");
    header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authorization, Accept, Accept-Encoding");
    

提交回复
热议问题