From 3222cf821d9df7e970f9ba248ab708b010bbe267 Mon Sep 17 00:00:00 2001 From: andrey Date: Thu, 5 Aug 2021 18:41:09 +0300 Subject: [PATCH] fix cors --- .../api/controllers/ProfileController.php | 26 +++++++++---------- .../api/controllers/SkillsController.php | 26 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/frontend/modules/api/controllers/ProfileController.php b/frontend/modules/api/controllers/ProfileController.php index 12f9b65..e347d71 100644 --- a/frontend/modules/api/controllers/ProfileController.php +++ b/frontend/modules/api/controllers/ProfileController.php @@ -24,19 +24,19 @@ class ProfileController extends \yii\rest\Controller 'class' => QueryParamAuth::class, //implement access token authentication 'except' => ['login'], // no need to verify the access token method, pay attention to distinguish between $noAclLogin ], - 'corsFilter' => [ - 'class' => GsCors::class, - 'cors' => [ - 'Origin' => ['https://itguild.info'], - //'Access-Control-Allow-Credentials' => true, - 'Access-Control-Allow-Headers' => [ - 'Content-Type', - 'Access-Control-Allow-Headers', - 'Authorization', - 'X-Requested-With' - ], - ] - ] +// 'corsFilter' => [ +// 'class' => GsCors::class, +// 'cors' => [ +// 'Origin' => ['https://itguild.info'], +// //'Access-Control-Allow-Credentials' => true, +// 'Access-Control-Allow-Headers' => [ +// 'Content-Type', +// 'Access-Control-Allow-Headers', +// 'Authorization', +// 'X-Requested-With' +// ], +// ] +// ] ]; } diff --git a/frontend/modules/api/controllers/SkillsController.php b/frontend/modules/api/controllers/SkillsController.php index adf1706..1227319 100644 --- a/frontend/modules/api/controllers/SkillsController.php +++ b/frontend/modules/api/controllers/SkillsController.php @@ -22,19 +22,19 @@ class SkillsController extends \yii\rest\Controller 'class' => QueryParamAuth::class, //implement access token authentication 'except' => ['login'], // no need to verify the access token method, pay attention to distinguish between $noAclLogin ], - 'corsFilter' => [ - 'class' => GsCors::class, - 'cors' => [ - 'Origin' => ['*'], - //'Access-Control-Allow-Credentials' => true, - 'Access-Control-Allow-Headers' => [ - 'Content-Type', - 'Access-Control-Allow-Headers', - 'Authorization', - 'X-Requested-With' - ], - ] - ] +// 'corsFilter' => [ +// 'class' => GsCors::class, +// 'cors' => [ +// 'Origin' => ['*'], +// //'Access-Control-Allow-Credentials' => true, +// 'Access-Control-Allow-Headers' => [ +// 'Content-Type', +// 'Access-Control-Allow-Headers', +// 'Authorization', +// 'X-Requested-With' +// ], +// ] +// ] ]; }