Commit b691727f authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

fix See merge request !377
parents 9e5fda4e 6a102dce
......@@ -49,12 +49,12 @@ class BaseController extends Controller
$this->currency_id = \Yii::$app->request->headers->get('FZM-CURRENCY-ID');
}
$allow_list = array_unique(\Yii::$app->params['allow_options_domain']['allow_options_domain']);
$origin = \Yii::$app->request->headers->get('Origin');
if (!in_array($origin, $allow_list)) {
$origin = implode(',', $allow_list);
}
// $allow_list = array_unique(\Yii::$app->params['allow_options_domain']['allow_options_domain']);
//
// $origin = \Yii::$app->request->headers->get('Origin');
// if (!in_array($origin, $allow_list)) {
// $origin = implode(',', $allow_list);
// }
$this->header('Access-Control-Allow-Origin', $origin);
$this->header('Access-Control-Allow-Methods', 'POST,GET,OPTIONS,PUT,DELETE');
$this->header('Access-Control-Allow-Credentials', 'true');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment