Commit be2d5530 by Philippe Gaultier

Allow the user to remove field by nulling it's value. Usefull for Access-Control-Max-Age

parent 25ad826d
......@@ -108,8 +108,9 @@ class Cors extends ActionFilter
{
if (isset($this->actions[$action->id])) {
$actionParams = $this->actions[$action->id];
$actionParamsKeys = array_keys($actionParams);
foreach ($this->cors as $headerField => $headerValue) {
if (isset($actionParams[$headerField])) {
if (in_array($headerField, $actionParamsKeys)) {
$this->cors[$headerField] = $actionParams[$headerField];
}
}
......
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