diff --git a/framework/filters/Cors.php b/framework/filters/Cors.php index b6b99a79bfc..c377dcb0994 100644 --- a/framework/filters/Cors.php +++ b/framework/filters/Cors.php @@ -123,8 +123,10 @@ public function beforeAction($action) */ public function overrideDefaultSettings($action) { - if (isset($this->actions[$action->id])) { - $actionParams = $this->actions[$action->id]; + $actionId = $this->getActionId($action); + + if (isset($this->actions[$actionId])) { + $actionParams = $this->actions[$actionId]; $actionParamsKeys = array_keys($actionParams); foreach ($this->cors as $headerField => $headerValue) { if (in_array($headerField, $actionParamsKeys)) {