修复跨域报错
This commit is contained in:
@@ -30,7 +30,7 @@ class AllowCrossDomain implements MiddlewareInterface
|
|||||||
'Access-Control-Allow-Credentials' => 'true',
|
'Access-Control-Allow-Credentials' => 'true',
|
||||||
'Access-Control-Max-Age' => '1800',
|
'Access-Control-Max-Age' => '1800',
|
||||||
'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
'Access-Control-Allow-Methods' => 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
||||||
'Access-Control-Allow-Headers' => 'Content-Type, Authorization, batoken, ba-user-token, think-lang, lang',
|
'Access-Control-Allow-Headers' => 'Content-Type, Authorization, batoken, ba-user-token, think-lang, lang, server',
|
||||||
];
|
];
|
||||||
$origin = $request->header('origin');
|
$origin = $request->header('origin');
|
||||||
if (is_array($origin)) {
|
if (is_array($origin)) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
// 允许跨域访问的域名(* 表示任意;开发可用 *,生产建议填具体域名)
|
// 允许跨域访问的域名(* 表示任意;开发可用 *,生产建议填具体域名)
|
||||||
'cors_request_domain' => '*,playx-admin.cjdhr.top',
|
'cors_request_domain' => '*',
|
||||||
// 是否开启会员登录验证码
|
// 是否开启会员登录验证码
|
||||||
'user_login_captcha' => false,
|
'user_login_captcha' => false,
|
||||||
// 是否开启管理员登录验证码
|
// 是否开启管理员登录验证码
|
||||||
|
|||||||
Reference in New Issue
Block a user