Cross-Origin Request Headers(CORS) with PHP headers

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

    add this code in .htaccess

    add custom authentication key's in header like app_key,auth_key..etc

    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Headers: "customKey1,customKey2, headers, Origin, X-Requested-With, Content-Type, Accept, Authorization"
    

提交回复
热议问题