This commit is contained in:
andrey 2021-08-05 18:41:09 +03:00
parent a275a7aac2
commit 3222cf821d
2 changed files with 26 additions and 26 deletions

View File

@ -24,19 +24,19 @@ class ProfileController extends \yii\rest\Controller
'class' => QueryParamAuth::class, //implement access token authentication 'class' => QueryParamAuth::class, //implement access token authentication
'except' => ['login'], // no need to verify the access token method, pay attention to distinguish between $noAclLogin 'except' => ['login'], // no need to verify the access token method, pay attention to distinguish between $noAclLogin
], ],
'corsFilter' => [ // 'corsFilter' => [
'class' => GsCors::class, // 'class' => GsCors::class,
'cors' => [ // 'cors' => [
'Origin' => ['https://itguild.info'], // 'Origin' => ['https://itguild.info'],
//'Access-Control-Allow-Credentials' => true, // //'Access-Control-Allow-Credentials' => true,
'Access-Control-Allow-Headers' => [ // 'Access-Control-Allow-Headers' => [
'Content-Type', // 'Content-Type',
'Access-Control-Allow-Headers', // 'Access-Control-Allow-Headers',
'Authorization', // 'Authorization',
'X-Requested-With' // 'X-Requested-With'
], // ],
] // ]
] // ]
]; ];
} }

View File

@ -22,19 +22,19 @@ class SkillsController extends \yii\rest\Controller
'class' => QueryParamAuth::class, //implement access token authentication 'class' => QueryParamAuth::class, //implement access token authentication
'except' => ['login'], // no need to verify the access token method, pay attention to distinguish between $noAclLogin 'except' => ['login'], // no need to verify the access token method, pay attention to distinguish between $noAclLogin
], ],
'corsFilter' => [ // 'corsFilter' => [
'class' => GsCors::class, // 'class' => GsCors::class,
'cors' => [ // 'cors' => [
'Origin' => ['*'], // 'Origin' => ['*'],
//'Access-Control-Allow-Credentials' => true, // //'Access-Control-Allow-Credentials' => true,
'Access-Control-Allow-Headers' => [ // 'Access-Control-Allow-Headers' => [
'Content-Type', // 'Content-Type',
'Access-Control-Allow-Headers', // 'Access-Control-Allow-Headers',
'Authorization', // 'Authorization',
'X-Requested-With' // 'X-Requested-With'
], // ],
] // ]
] // ]
]; ];
} }