mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
parent
36726bc850
commit
2b63386f9f
|
|
@ -123,9 +123,18 @@ class Header extends HeaderAbstract
|
|||
throw new \Exception('Already locked');
|
||||
}
|
||||
|
||||
$key = strtolower($key);
|
||||
|
||||
if (!$overwrite && isset($this->header[$key])) {
|
||||
return false;
|
||||
} elseif ($overwrite) {
|
||||
} elseif ($overwrite && isset($this->header[$key])) {
|
||||
if($key === 'content-security-policy' ||
|
||||
$key === 'x-xss-protection' ||
|
||||
$key === 'x-content-type-options' ||
|
||||
$key === 'x-frame-options') {
|
||||
throw new \Exception('Cannot change security headers.');
|
||||
}
|
||||
|
||||
unset($this->header[$key]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user