Skip to content

Commit

Permalink
REST OPTIONS Action bug fix with Header name (#15869)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkot authored and samdark committed Mar 10, 2018
1 parent 8be4563 commit 80da46c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/rest/OptionsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ public function run($id = null)
$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));
}
}

0 comments on commit 80da46c

Please sign in to comment.