]> source.dussan.org Git - nextcloud-server.git/commitdiff
perf: Set session.cache_limiter at runtime to avoid clients caching static assets... 46320/head
authorJulius Härtl <jus@bitgrid.net>
Fri, 5 Jul 2024 12:39:30 +0000 (14:39 +0200)
committerJulius Härtl <jus@bitgrid.net>
Mon, 8 Jul 2024 20:30:27 +0000 (22:30 +0200)
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>
lib/private/Session/Internal.php

index 4384b0ab5c0c482f3b7ed8387c014b3273598c3b..b64618245b86707bcb8eaaea7c74e43238a391db 100644 (file)
@@ -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) {