Answer the question
In order to leave comments, you need to log in
How to allow cross domain requests in Yii 2?
public function behaviors()
{
return [
'corsFilter' => [
'class' => \yii\filters\Cors::className(),
'cors' => [
// restrict access to
'Origin' => ['*'],
],
],
];
}
Answer the question
In order to leave comments, you need to log in
Like this: https://github.com/samdark/yii2-cookbook/blob/mast...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question