mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
REST OPTIONS Action bug fix with Header name (#15869)
This commit is contained in:

committed by
Alexander Makarov

parent
8be4563341
commit
80da46c32d
@ -41,6 +41,6 @@ class OptionsAction extends \yii\base\Action
|
||||
$options = $id === null ? $this->collectionOptions : $this->resourceOptions;
|
||||
$headers = Yii::$app->getResponse()->getHeaders();
|
||||
$headers->set('Allow', implode(', ', $options));
|
||||
$headers->set('Access-Control-Allow-Method', implode(', ', $options));
|
||||
$headers->set('Access-Control-Allow-Methods', implode(', ', $options));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user