跨域
This commit is contained in:
@@ -4,7 +4,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use support\App;
|
use support\App;
|
||||||
|
header('Access-Control-Allow-Origin: *'); // 允许所有域访问
|
||||||
|
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
|
||||||
|
header('Access-Control-Allow-Headers: X-Requested-With, Content-Type, Accept, Origin, Authorization');
|
||||||
|
header('Access-Control-Allow-Credentials: true'); // 允许发送Cookie等认证信息
|
||||||
chdir(__DIR__);
|
chdir(__DIR__);
|
||||||
require_once __DIR__ . '/../vendor/autoload.php';
|
require_once __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user