[ 'class' => GsCors::class, 'cors' => [ 'Origin' => ['*'], 'Access-Control-Request-Methods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'], //'Access-Control-Allow-Credentials' => true, 'Access-Control-Allow-Headers' => [ 'Access-Control-Allow-Origin', 'Access-Control-Request-Methods', 'Content-Type', 'Access-Control-Allow-Headers', 'Authorization', 'X-Requested-With' ], ] ], 'authenticator' => [ 'class' => CompositeAuth::class, 'authMethods' => [ HttpBearerAuth::class, ], ], [ 'class' => ContentNegotiator::className(), 'formats' => [ 'application/json' => Response::FORMAT_JSON, ], ], ]; } }