|
|
<?php
|
|
|
// 执行允许跨域处理
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
|
//header("Access-Control-Allow-Methods: *");
|
|
|
header('Access-Control-Allow-Credentials:true');
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
|
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, platform,token");
|
|
|
header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE,OPTIONS,PATCH');
|
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
header('Access-Control-Allow-Credentials: true'); // 设置是否允许发送 cookies
|
|
|
header('Access-Control-Expose-Headers: *'); //服务器 headers 白名单,可以让客户端进行访问
|
|
|
header('Access-Control-Allow-Headers: *');
|
|
|
// +----------------------------------------------------------------------
|
|
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
|
|
// +----------------------------------------------------------------------
|
...
|
...
|
|