From 5f5b85817563bc506842050e3a8cde9ccf7ccbae Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 25 Mar 2020 19:57:39 +0000 Subject: [PATCH] allow images and thumbs to be cached when served in docker --- tests/router.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/router.php b/tests/router.php index d04ff314..77a6c1be 100644 --- a/tests/router.php +++ b/tests/router.php @@ -14,6 +14,7 @@ require_once "core/util.php"; $matches = []; if (preg_match('/\/_(images|thumbs)\/([0-9a-f]{32}).*$/', $_SERVER["REQUEST_URI"], $matches)) { header('Content-Type: image/jpeg'); + header("Cache-control: public, max-age=86400"); print(file_get_contents(warehouse_path($matches[1], $matches[2]))); return true; }