summaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework
diff options
context:
space:
mode:
authorClement Wong <git@clement.hk>2020-05-10 11:06:56 +0200
committerClement Wong <git@clement.hk>2020-05-10 11:24:08 +0200
commit401210d259be88918ea880aa32fde9e81fbe8bb2 (patch)
tree64b60536c5fa6f321fb6fcef61bfd226d3677711 /lib/public/AppFramework
parent0eeb6606796260bc3e0da3f2e6deb3a7cc522c3c (diff)
downloadnextcloud-server-401210d259be88918ea880aa32fde9e81fbe8bb2.tar.gz
nextcloud-server-401210d259be88918ea880aa32fde9e81fbe8bb2.zip
Proxy server could cache http response when it is not private
Signed-off-by: Clement Wong <git@clement.hk>
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r--lib/public/AppFramework/Http/Response.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index a48580c789d..27a2fd3a008 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();