diff options
-rw-r--r-- | .htaccess | 2 | ||||
-rw-r--r-- | lib/public/AppFramework/Http/Response.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.htaccess b/.htaccess index 164a630b75f..91b728847cf 100644 --- a/.htaccess +++ b/.htaccess @@ -49,7 +49,7 @@ # Add cache control for static resources <FilesMatch "\.(css|js|mjs|svg|gif|png|jpg|webp|ico|wasm|tflite)$"> <If "%{QUERY_STRING} =~ /(^|&)v=/"> - Header set Cache-Control "max-age=15778463, immutable" + Header set Cache-Control "max-age=15778463, must-revalidate, immutable" </If> <Else> Header set Cache-Control "max-age=15778463" diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 6fc3d4b98ea..93e305d2445 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -89,7 +89,7 @@ class Response { public function cacheFor(int $cacheSeconds, bool $public = false, bool $immutable = false) { if ($cacheSeconds > 0) { $cacheStore = $public ? 'public' : 'private'; - $this->addHeader('Cache-Control', sprintf('%s, max-age=%s, %s', $cacheStore, $cacheSeconds, ($immutable ? 'immutable' : 'must-revalidate'))); + $this->addHeader('Cache-Control', sprintf('%s, max-age=%s, %s', $cacheStore, $cacheSeconds, ($immutable ? 'must-revalidate, immutable' : 'must-revalidate'))); // Set expires header $expires = new \DateTime(); |