diff --git a/app/templates/element/httpHeaders.php b/app/templates/element/httpHeaders.php new file mode 100644 index 000000000..f822c8c90 --- /dev/null +++ b/app/templates/element/httpHeaders.php @@ -0,0 +1,43 @@ +element('httpHeaders'); // Theme Dark mode state $darkModeState = $this->ApplicationState->getValue(ApplicationStateEnum::ProfileDarkMode, 'auto'); diff --git a/app/templates/layout/error.php b/app/templates/layout/error.php index 081468acd..ae88135c0 100644 --- a/app/templates/layout/error.php +++ b/app/templates/layout/error.php @@ -29,16 +29,7 @@ use App\Lib\Enum\ApplicationStateEnum; -// As a general rule, all Registry pages are post-login and so shouldn't be cached -header("Expires: Thursday, 10-Jan-69 00:00:00 GMT"); -header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate"); -header("Pragma: no-cache"); -header("Content-Security-Policy: frame-ancestors 'self'"); - -// Add X-UA-Compatible header for IE -if(isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { - header('X-UA-Compatible: IE=edge,chrome=1'); -} +print $this->element('httpHeaders'); // Theme Dark mode state $darkModeState = $this->ApplicationState->getValue(ApplicationStateEnum::ProfileDarkMode, 'auto'); diff --git a/app/templates/layout/iframe.php b/app/templates/layout/iframe.php index 236ddbdfe..439efcc1c 100644 --- a/app/templates/layout/iframe.php +++ b/app/templates/layout/iframe.php @@ -29,16 +29,7 @@ use App\Lib\Enum\ApplicationStateEnum; -// As a general rule, all Registry pages are post-login and so shouldn't be cached -header("Expires: Thursday, 10-Jan-69 00:00:00 GMT"); -header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate"); -header("Pragma: no-cache"); -header("Content-Security-Policy: frame-ancestors 'self'"); - -// Add X-UA-Compatible header for IE -if(isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { - header('X-UA-Compatible: IE=edge,chrome=1'); -} +print $this->element('httpHeaders'); // Theme Dark mode state $darkModeState = $this->ApplicationState->getValue(ApplicationStateEnum::ProfileDarkMode, 'auto');