From 5d726f4335ad876243a74a8df235b89e20b2834e Mon Sep 17 00:00:00 2001 From: Clement Wong Date: Sun, 10 May 2020 11:06:56 +0200 Subject: [PATCH] Proxy server could cache http response when it is not private Signed-off-by: Clement Wong --- lib/public/AppFramework/Http/Response.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index f46aa9e2880..18619095694 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -106,11 +106,11 @@ class Response { * @since 6.0.0 - return value was added in 7.0.0 */ public function cacheFor(int $cacheSeconds) { - if($cacheSeconds > 0) { - $this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds . ', must-revalidate'); + if ($cacheSeconds > 0) { + $this->addHeader('Cache-Control', 'private, max-age=' . $cacheSeconds . ', must-revalidate'); // Old scool prama caching - $this->addHeader('Pragma', 'public'); + $this->addHeader('Pragma', 'private'); // Set expires header $expires = new \DateTime(); -- 2.39.5