diff options
author | Clement Wong <git@clement.hk> | 2020-05-10 12:06:56 +0300 |
---|---|---|
committer | Clement Wong <git@clement.hk> | 2020-05-13 15:40:02 +0300 |
commit | 33e1a04601b50d4e337cb2c2b207af6502718de6 (patch) | |
tree | 7319fcae2ee8e24ad0ecc55ec614cbd2edc433e5 /lib | |
parent | b93b71dcb11201659def6d86943ee2d9a4f4efa9 (diff) |
Proxy server could cache http response when it is not private
Signed-off-by: Clement Wong <git@clement.hk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/AppFramework/Http/Response.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 15318f30bbd..4abf232c31e 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(); |