|
|
@ -39,6 +39,7 @@ use yii\web\Response; |
|
|
|
* return [ |
|
|
|
* return [ |
|
|
|
* 'corsFilter' => [ |
|
|
|
* 'corsFilter' => [ |
|
|
|
* 'class' => \yii\filters\Cors::className(), |
|
|
|
* 'class' => \yii\filters\Cors::className(), |
|
|
|
|
|
|
|
* 'cors' => [ |
|
|
|
* // restrict access to |
|
|
|
* // restrict access to |
|
|
|
* 'Origin' => ['http://www.myserver.com', 'https://www.myserver.com'], |
|
|
|
* 'Origin' => ['http://www.myserver.com', 'https://www.myserver.com'], |
|
|
|
* 'Access-Control-Request-Method' => ['POST', 'PUT'], |
|
|
|
* 'Access-Control-Request-Method' => ['POST', 'PUT'], |
|
|
@ -48,6 +49,7 @@ use yii\web\Response; |
|
|
|
* 'Access-Control-Allow-Credentials' => true, |
|
|
|
* 'Access-Control-Allow-Credentials' => true, |
|
|
|
* // Allow OPTIONS caching |
|
|
|
* // Allow OPTIONS caching |
|
|
|
* 'Access-Control-Max-Age' => 3600, |
|
|
|
* 'Access-Control-Max-Age' => 3600, |
|
|
|
|
|
|
|
* ], |
|
|
|
* |
|
|
|
* |
|
|
|
* ], |
|
|
|
* ], |
|
|
|
* ]; |
|
|
|
* ]; |
|
|
|