fixed
This commit is contained in:
@@ -18,5 +18,12 @@ require __DIR__ . '/../thinkphp/base.php';
|
||||
|
||||
// 支持事先使用静态方法设置Request对象和Config对象
|
||||
|
||||
|
||||
header("Access-Control-Allow-Origin: *");//允许所有地址跨域请求
|
||||
// CORS
|
||||
// 告诉浏览器, 允许哪些请求方式
|
||||
header("Access-Control-Request-Methods:GET, POST");
|
||||
// 告诉浏览器, 允许哪些额外的请求头信息
|
||||
header('Access-Control-Allow-Headers:x-requested-with,content-type,test-token,token,test-sessid,authorization');
|
||||
// 执行应用并响应
|
||||
Container::get('app')->run()->send();
|
||||
|
||||
Reference in New Issue
Block a user