标签:let 入口 headers php put auth origin cep with
请求跨域,前端发送options请求时,加上一下请求头即可:
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
header(‘Access-Control-Allow-Methods: GET, POST, PUT,DELETE,OPTIONS,PATCH‘);
注:加在入口文件
标签:let 入口 headers php put auth origin cep with
原文地址:https://www.cnblogs.com/ayanboke/p/11799331.html