feat: 加入跨域处理
This commit is contained in:
@@ -29,7 +29,9 @@
|
||||
"topthink/think-view": "^2.0",
|
||||
"topthink/think-captcha": "^3.0",
|
||||
"thans/tp-jwt-auth": "^2.2",
|
||||
"topthink/think-throttle": "^2.0"
|
||||
"topthink/think-throttle": "^2.0",
|
||||
"intervention/image": "^3.10",
|
||||
"topthink/think-cors": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/var-dumper": ">=4.2",
|
||||
|
||||
12
config/cors.php
Normal file
12
config/cors.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'paths' => [],
|
||||
'allowed_origins' => ['*'],
|
||||
'allowed_origins_patterns' => [],
|
||||
'allowed_methods' => ['*'],
|
||||
'allowed_headers' => ['*'],
|
||||
'exposed_headers' => [],
|
||||
'max_age' => 0,
|
||||
'supports_credentials' => true,
|
||||
];
|
||||
Reference in New Issue
Block a user