Commit 7c0b56cb by peeradach001

fix

parent fb2bb91e
...@@ -96,7 +96,7 @@ class VerbFilter extends Behavior ...@@ -96,7 +96,7 @@ class VerbFilter extends Behavior
$verb = Yii::$app->getRequest()->getMethod(); $verb = Yii::$app->getRequest()->getMethod();
$allowed = array_map('strtoupper', $verbs); $allowed = array_map('strtoupper', $verbs);
if (!in_array($verb, array_map('strtoupper', $verbs))) { if (!in_array($verb, $allowed)) {
$event->isValid = false; $event->isValid = false;
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7
Yii::$app->getResponse()->getHeaders()->set('Allow', implode(', ', $allowed)); Yii::$app->getResponse()->getHeaders()->set('Allow', implode(', ', $allowed));
......
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