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