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);
             }
-        }
+
     }
 }