diff --git a/src/Controller.php b/src/Controller.php index 4125681..9f470ce 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -12,6 +12,7 @@ use yii\web\filters\ContentNegotiator; use yii\web\filters\RateLimiter; use yii\web\filters\VerbFilter; +use yii\web\filters\Cors; use yii\web\Response; use yii\base\Action; @@ -56,6 +57,9 @@ public function behaviors() 'application/xml' => Response::FORMAT_XML, ], ], + 'cors' => [ + '__class' => Cors::class, + ], 'verbFilter' => [ '__class' => VerbFilter::class, 'actions' => $this->verbs(),