CORS,全称(Cross-origin resource sharing)(跨域资源共享)

07-14 1366阅读

PHP

CORS,全称(Cross-origin resource sharing)(跨域资源共享)
(图片来源网络,侵删)

header("Access-Control-Allow-Origin:http://localhost:911");

header("Access-Control-Allow-Methods: POST, GET, OPTIONS, HEAD");

header("Access-Control-Allow-Headers: Authorization, X-Requested-With, X-PINGOTHER, Content-Type");

header("Access-Control-Allow-Credentials: true");

Credentials false的时候 origin methods 这些可以写成*

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]