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
|
'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'
|
||||||
],
|
// ],
|
||||||
]
|
// ]
|
||||||
]
|
// ]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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'
|
||||||
],
|
// ],
|
||||||
]
|
// ]
|
||||||
]
|
// ]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user