fix cors
This commit is contained in:
parent
a275a7aac2
commit
3222cf821d
@ -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'
|
||||
// ],
|
||||
// ]
|
||||
// ]
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -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'
|
||||
// ],
|
||||
// ]
|
||||
// ]
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user