From 1331eb1fb8a93f9d5d809918dfc8bf06506371a2 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index a48580c789..27a2fd3a00 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -107,10 +107,10 @@ class Response { */ public function cacheFor(int $cacheSeconds) { if ($cacheSeconds > 0) { - $this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds . ', must-revalidate'); + $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();