summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2024-07-05 14:39:30 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-07-10 09:55:28 +0000
commit9974f0b722ae3dd8d7e8d8cbc0ff350bd64fc7b0 (patch)
treee57df6c185755ce943898dbd14abfae30aa6d9cb /lib
parent974fd522e43ade8163f8a3bd7fb9fae9cfc4518a (diff)
downloadnextcloud-server-9974f0b722ae3dd8d7e8d8cbc0ff350bd64fc7b0.tar.gz
nextcloud-server-9974f0b722ae3dd8d7e8d8cbc0ff350bd64fc7b0.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 5fb9b05c5f4..c0c72d1ce01 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) {