diff options
author | Julius Härtl <jus@bitgrid.net> | 2024-07-05 14:39:30 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2024-07-08 22:30:27 +0200 |
commit | 38bee2c014db4041c780d0aee8a59808be2dbb3a (patch) | |
tree | 96d5ca289daf99c390b1b3b77e22570fa740b532 /lib | |
parent | 7b60b989b0382134232d8c223dfece8410267a37 (diff) | |
download | nextcloud-server-38bee2c014db4041c780d0aee8a59808be2dbb3a.tar.gz nextcloud-server-38bee2c014db4041c780d0aee8a59808be2dbb3a.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.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index 4384b0ab5c0..b64618245b8 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -28,6 +28,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) { |