This commit is contained in:
tokslaw7
2023-04-25 00:10:33 +00:00
parent 3234201ff1
commit cff5c17d28
+2 -2
View File
@@ -43,11 +43,11 @@ class Cors implements FilterInterface
log_message('critical', "CORS 0001 ->ORIGIN->".$origin);
if (in_array($origin, $allowed_domains)) {
header('Access-Control-Allow-Origin: ' . $origin);
#header('Access-Control-Allow-Origin: ' . $origin);
}
header("Access-Control-Allow-Headers: Origin, X-API-KEY, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Access-Control-Allow-Headers, Authorization, observe, enctype, Content-Length, X-Csrf-Token");
header("Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS");
header("Access-Control-Allow-Credentials: true");
#header("Access-Control-Allow-Credentials: true");
header("Access-Control-Max-Age: 3600");
#header('content-type: application/json; charset=utf-8');
$method = $_SERVER['REQUEST_METHOD'];