From edea2cc3e766a72f4bd6b7535ce979329f7905d8 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Thu, 20 Apr 2023 00:20:34 +0300 Subject: [PATCH] fix cors --- frontend/modules/api/controllers/ApiController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/modules/api/controllers/ApiController.php b/frontend/modules/api/controllers/ApiController.php index d38d2b7..48c39e4 100644 --- a/frontend/modules/api/controllers/ApiController.php +++ b/frontend/modules/api/controllers/ApiController.php @@ -58,7 +58,8 @@ class ApiController extends Controller 'Authorization', 'X-Requested-With' ], - 'Access-Control-Allow-Methods' => ['*'], + 'Access-Control-Allow-Methods' => ['POST', 'GET', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], + 'Access-Control-Request-Method' => ['POST', 'GET', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], ] ], 'authenticator' => [