bug fixing

This commit is contained in:
Roland Schneider
2021-09-28 20:53:50 +02:00
parent e6f8660d78
commit 6cd7af5fd0
2 changed files with 3 additions and 29 deletions

View File

@@ -20,26 +20,11 @@ class RestController extends Controller
{
$behaviors = parent::behaviors();
$auth = $behaviors['authenticator'];
unset($behaviors['authenticator']);
$behaviors['corsFilter'] = [
'class' => Cors::class,
'cors' => [
'Origin' => ['https://botondfitness.hu'],
'Access-Control-Request-Method' => ['POST', 'GET', 'OPTIONS'],
'Access-Control-Allow-Headers' => ['*'],
'Access-Control-Expose-Headers' => ['*']
],
];
$behaviors['authenticator'] = $auth;
$behaviors['authenticator'] = [
'class' => JwtHttpBearerAuth::class,
'auth' => [$this, 'auth'],
'optional' => $this->getOptionalActions(),
];
$behaviors['authenticator']['except'] = ['options'];
return $behaviors;
}