[ 'except' => ['recaptcha-public-key'], ], ]); } public function verbs() { return [ 'recaptcha-public-key' => ['GET'], ]; } public function actionRecaptchaPublicKey() { Yii::$app->response->format = Response::FORMAT_RAW; return Yii::$app->reCaptcha->public; } }