guild/frontend/modules/api/controllers/ReportsController.php
2021-07-05 15:30:35 +03:00

40 lines
981 B
PHP

<?php
namespace frontend\modules\api\controllers;
use common\behaviors\GsCors;
class ReportsController extends \yii\rest\Controller
{
public function behaviors()
{
return [
[
'class' => \yii\filters\ContentNegotiator::className(),
'formats' => [
'application/json' => \yii\web\Response::FORMAT_JSON,
],
],
'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'
],
]
]
];
}
public function actionIndex()
{
}
}