bug fixing
This commit is contained in:
parent
f9c845f722
commit
300defb905
@ -28,7 +28,7 @@ use yii\web\Response;
|
|||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
|
|
||||||
class EventController extends CustomerApiController
|
class EventController extends RestController
|
||||||
{
|
{
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -20,18 +20,18 @@ class RestController extends Controller
|
|||||||
{
|
{
|
||||||
$behaviors = parent::behaviors();
|
$behaviors = parent::behaviors();
|
||||||
|
|
||||||
// $auth = $behaviors['authenticator'];
|
$auth = $behaviors['authenticator'];
|
||||||
// unset($behaviors['authenticator']);
|
unset($behaviors['authenticator']);
|
||||||
|
|
||||||
// $behaviors['corsFilter'] = [
|
$behaviors['corsFilter'] = [
|
||||||
// 'class' => CorsCustom::class,
|
'class' => Cors::class,
|
||||||
// 'cors' => [
|
'cors' => [
|
||||||
// // restrict access to
|
'Origin' => ['https://botondfitness.hu'],
|
||||||
// 'Origin' => ['https://botondfitness.hu'],
|
'Access-Control-Request-Method' => ['POST', 'GET', 'OPTIONS'],
|
||||||
// // Allow credentials (cookies, authorization headers, etc.) to be exposed to the browser
|
'Access-Control-Allow-Headers' => ['*'],
|
||||||
// 'Access-Control-Allow-Credentials' => true,
|
'Access-Control-Expose-Headers' => ['*']
|
||||||
// ]
|
],
|
||||||
// ];
|
];
|
||||||
|
|
||||||
// $behaviors['authenticator'] = $auth;
|
// $behaviors['authenticator'] = $auth;
|
||||||
$behaviors['authenticator'] = [
|
$behaviors['authenticator'] = [
|
||||||
@ -39,6 +39,7 @@ class RestController extends Controller
|
|||||||
'auth' => [$this, 'auth'],
|
'auth' => [$this, 'auth'],
|
||||||
'optional' => $this->getOptionalActions(),
|
'optional' => $this->getOptionalActions(),
|
||||||
];
|
];
|
||||||
|
$behaviors['authenticator']['except'] = ['options'];
|
||||||
|
|
||||||
return $behaviors;
|
return $behaviors;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user