From 75388a4d090fe1be7ca8d1223af7cdcf4b09cf72 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 17 Oct 2024 11:04:11 +0300 Subject: [PATCH] remove Pragma header --- application/Espo/Core/Api/ControllerActionHandler.php | 3 +-- application/Espo/EntryPoints/Attachment.php | 1 - application/Espo/EntryPoints/Download.php | 1 - application/Espo/EntryPoints/Image.php | 1 - application/Espo/EntryPoints/Pdf.php | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/application/Espo/Core/Api/ControllerActionHandler.php b/application/Espo/Core/Api/ControllerActionHandler.php index b78e35f207..e449dd5c42 100644 --- a/application/Espo/Core/Api/ControllerActionHandler.php +++ b/application/Espo/Core/Api/ControllerActionHandler.php @@ -85,7 +85,6 @@ class ControllerActionHandler implements RequestHandlerInterface ->setHeader('X-App-Timestamp', (string) ($this->config->get('appTimestamp') ?? '0')) ->setHeader('Expires', '0') ->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT') - ->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0') - ->setHeader('Pragma', 'no-cache'); + ->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); } } diff --git a/application/Espo/EntryPoints/Attachment.php b/application/Espo/EntryPoints/Attachment.php index 5eb4ef88fe..93ca05b615 100644 --- a/application/Espo/EntryPoints/Attachment.php +++ b/application/Espo/EntryPoints/Attachment.php @@ -93,7 +93,6 @@ class Attachment implements EntryPoint $size = $stream->getSize() ?? $this->fileStorageManager->getSize($attachment); $response - ->setHeader('Pragma', 'public') ->setHeader('Content-Length', (string) $size) ->setHeader('Content-Security-Policy', "default-src 'self'") ->setBody($stream); diff --git a/application/Espo/EntryPoints/Download.php b/application/Espo/EntryPoints/Download.php index 0a1fc20f58..0a3dd60199 100644 --- a/application/Espo/EntryPoints/Download.php +++ b/application/Espo/EntryPoints/Download.php @@ -102,7 +102,6 @@ class Download implements EntryPoint ->setHeader('Content-Disposition', $disposition . ";filename=\"" . $outputFileName . "\"") ->setHeader('Expires', '0') ->setHeader('Cache-Control', 'must-revalidate') - ->setHeader('Pragma', 'public') ->setHeader('Content-Length', (string) $size) ->setBody($stream); } diff --git a/application/Espo/EntryPoints/Image.php b/application/Espo/EntryPoints/Image.php index 9d23910692..0e0252f7c1 100644 --- a/application/Espo/EntryPoints/Image.php +++ b/application/Espo/EntryPoints/Image.php @@ -146,7 +146,6 @@ class Image implements EntryPoint $response ->setHeader('Content-Disposition', 'inline;filename="' . $fileName . '"') - ->setHeader('Pragma', 'public') ->setHeader('Cache-Control', 'max-age=360000, must-revalidate') ->setHeader('Content-Length', (string) $fileSize) ->setHeader('Content-Security-Policy', "default-src 'self'"); diff --git a/application/Espo/EntryPoints/Pdf.php b/application/Espo/EntryPoints/Pdf.php index 551017c4a3..db14170ed8 100644 --- a/application/Espo/EntryPoints/Pdf.php +++ b/application/Espo/EntryPoints/Pdf.php @@ -81,7 +81,6 @@ class Pdf implements EntryPoint $response ->setHeader('Content-Type', 'application/pdf') ->setHeader('Cache-Control', 'private, must-revalidate, post-check=0, pre-check=0, max-age=1') - ->setHeader('Pragma', 'public') ->setHeader('Expires', 'Sat, 26 Jul 1997 05:00:00 GMT') ->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT') ->setHeader('Content-Disposition', 'inline; filename="' . basename($fileName) . '"');