Commit d1868c8d authored by tufengqi's avatar tufengqi

options优化

parent 5e9deb3d
......@@ -23,9 +23,7 @@ class ResponseMsg
{
$allow_list = \Yii::$app->fpf->getConfig('allow_options_domain', 'common');
$origin = \Yii::$app->request->headers->get('Origin');
if (in_array($origin, $allow_list)) {
$origin = '';
} else {
if (!in_array($origin, $allow_list)) {
$origin = implode(',', $allow_list);
}
$this->header('Access-Control-Allow-Origin', $origin);
......
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