Explorar o código

修改请求头

wanghaijun %!s(int64=4) %!d(string=hai) anos
pai
achega
fd5184f5cd
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Http/Controllers/AppiontController.php

+ 2 - 2
app/Http/Controllers/AppiontController.php

xqd xqd
@@ -25,7 +25,7 @@ class AppiontController extends Controller
         header('Access-Control-Allow-Credentials: true');
 
         // 响应头设置
-        header('Access-Control-Allow-Headers:x-requested-with,Content-Type,X-CSRF-Token');
+        header('Access-Control-Allow-Headers:x-requested-with,Content-Type,X-CSRF-Token,authorization');
 
     }
 
@@ -41,7 +41,7 @@ class AppiontController extends Controller
        header('Access-Control-Allow-Credentials: true');
 
        // 响应头设置
-       header('Access-Control-Allow-Headers:x-requested-with,Content-Type,X-CSRF-Token');
+       header('Access-Control-Allow-Headers:x-requested-with,Content-Type,X-CSRF-Token,authorization');
 
        $data = request()->all();
        $defaulRes = [