summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2024-07-05 14:39:30 +0200
committerAndy Scherzinger <info@andy-scherzinger.de>2024-07-11 08:31:21 +0200
commitea262a8ca3f04ae4c8df5c0757fa03fdd3661e34 (patch)
tree263803508d9fe051b6f8337aa39f407903ba60e4 /lib
parent0986d295b159f0d00617b18beba05a6515992397 (diff)
downloadnextcloud-server-ea262a8ca3f04ae4c8df5c0757fa03fdd3661e34.tar.gz
nextcloud-server-ea262a8ca3f04ae4c8df5c0757fa03fdd3661e34.zip
perf: Set session.cache_limiter at runtime to avoid clients caching static assets served by PHP
By default there is a Pragma: no-cache header set due to the default value `no-cache` of session.cache-limiter, which will cause Chrome and iOS to not cache even with a different Cache-Control header set on the response. Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Session/Internal.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php
index 6c0e8538684..bbc8ca83464 100644
--- a/lib/private/Session/Internal.php
+++ b/lib/private/Session/Internal.php
@@ -52,6 +52,7 @@ class Internal extends Session {
public function __construct(string $name) {
set_error_handler([$this, 'trapError']);
$this->invoke('session_name', [$name]);
+ $this->invoke('session_cache_limiter', ['']);
try {
$this->startSession();
} catch (\Exception $e) {