From de3539bfd9113a1717cfcfd19be0e6b00c6161b8 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Thu, 20 Apr 2023 00:06:23 +0300 Subject: [PATCH] fix cors --- frontend/modules/api/controllers/ApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/modules/api/controllers/ApiController.php b/frontend/modules/api/controllers/ApiController.php index a47632a..d38d2b7 100644 --- a/frontend/modules/api/controllers/ApiController.php +++ b/frontend/modules/api/controllers/ApiController.php @@ -49,16 +49,16 @@ class ApiController extends Controller 'class' => GsCors::class, 'cors' => [ 'Origin' => ['*'], - 'Access-Control-Request-Methods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'], //'Access-Control-Allow-Credentials' => true, 'Access-Control-Allow-Headers' => [ 'Access-Control-Allow-Origin', - 'Access-Control-Request-Methods', + 'Access-Control-Allow-Methods', 'Content-Type', 'Access-Control-Allow-Headers', 'Authorization', 'X-Requested-With' ], + 'Access-Control-Allow-Methods' => ['*'], ] ], 'authenticator' => [