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