mirror of
https://github.com/elyby/accounts.git
synced 2024-12-29 00:20:22 +05:30
37 lines
762 B
PHP
37 lines
762 B
PHP
<?php
|
|
namespace api\controllers;
|
|
|
|
use api\filters\NginxCache;
|
|
use Yii;
|
|
use yii\helpers\ArrayHelper;
|
|
|
|
class OptionsController extends Controller {
|
|
|
|
public function behaviors() {
|
|
return ArrayHelper::merge(parent::behaviors(), [
|
|
'authenticator' => [
|
|
'except' => ['index'],
|
|
],
|
|
'nginxCache' => [
|
|
'class' => NginxCache::class,
|
|
'rules' => [
|
|
'index' => 3600, // 1h
|
|
],
|
|
],
|
|
]);
|
|
}
|
|
|
|
public function verbs() {
|
|
return [
|
|
'index' => ['GET'],
|
|
];
|
|
}
|
|
|
|
public function actionIndex() {
|
|
return [
|
|
'reCaptchaPublicKey' => Yii::$app->reCaptcha->public,
|
|
];
|
|
}
|
|
|
|
}
|