mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
clientXFrameOptionsHeaderDisabled
This commit is contained in:
@@ -104,13 +104,22 @@ class ClientManager
|
||||
return;
|
||||
}
|
||||
|
||||
$response->setHeader('X-Frame-Options', 'SAMEORIGIN');
|
||||
$response->setHeader('X-Content-Type-Options', 'nosniff');
|
||||
|
||||
$this->writeXFrameOptionsHeader($response);
|
||||
$this->writeContentSecurityPolicyHeader($response);
|
||||
$this->writeStrictTransportSecurityHeader($response);
|
||||
}
|
||||
|
||||
private function writeXFrameOptionsHeader(Response $response): void
|
||||
{
|
||||
if ($this->config->get('clientXFrameOptionsHeaderDisabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$response->setHeader('X-Frame-Options', 'SAMEORIGIN');
|
||||
}
|
||||
|
||||
private function writeContentSecurityPolicyHeader(Response $response): void
|
||||
{
|
||||
if ($this->config->get('clientCspDisabled')) {
|
||||
|
||||
Reference in New Issue
Block a user