Ken 1 settimana fa
parent
commit
f0577d79bc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      config/cors.php

+ 1 - 1
config/cors.php

@@ -5,7 +5,7 @@ return [
     'allowed_methods' => ['GET', 'POST', 'OPTIONS'],// 允许的 HTTP 方法,* 代表所有方法
     'allowed_origins' => ['*'],// 允许的源,* 代表所有域
     'allowed_origins_patterns' => [],//允许的源,通过正则表达式设置,这比allowed_origins 更加灵活
-    'allowed_headers' => ['Content-Type', 'Authorization', 'X-Requested-With'],// 允许的请求头,* 代表所有请求头
+    'allowed_headers' => ['Content-Type', 'Authorization', 'lang','X-Requested-With'],// 允许的请求头,* 代表所有请求头
     'exposed_headers' => ['Authorization'], // 允许暴露的响应头
     'max_age' => 0,// 缓存预检请求的时间(秒)
     'supports_credentials' => false,// 是否支持身份验证(例如 cookies)