zxhxx 3 年之前
父節點
當前提交
de74202f36
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      application/common.php

+ 3 - 6
application/common.php

@@ -426,11 +426,8 @@ if (!function_exists('check_cors_request')) {
      */
     function check_cors_request()
     {
-        if (isset($_SERVER['HTTP_ORIGIN']) && $_SERVER['HTTP_ORIGIN'] || true) {
-            $info = parse_url($_SERVER['HTTP_ORIGIN']);
-            $domainArr = explode(',', config('fastadmin.cors_request_domain'));
-            $domainArr[] = request()->host(true);
-            header("Access-Control-Allow-Origin:*");
+
+            header("Access-Control-Allow-Origin: *");
 
             header('Access-Control-Allow-Credentials: true');
             header('Access-Control-Max-Age: 86400');
@@ -445,7 +442,7 @@ if (!function_exists('check_cors_request')) {
                 $response = Response::create('', 'html');
                 throw new HttpResponseException($response);
             }
-        }
+
     }
 }