From ceb31b68ebdce92cc69f115a058e7796833e3272 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Sun, 25 Feb 2024 02:19:40 +0100 Subject: [PATCH] Add more cache-control headers to sql.php --- BlueMapCommon/webapp/public/sql.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BlueMapCommon/webapp/public/sql.php b/BlueMapCommon/webapp/public/sql.php index 6508c3ad..504b6434 100644 --- a/BlueMapCommon/webapp/public/sql.php +++ b/BlueMapCommon/webapp/public/sql.php @@ -162,6 +162,8 @@ if (startsWith($path, "/maps/")) { // return result if ($line = $statement->fetch()) { + header("Cache-Control: public,max-age=86400"); + if ($compression !== "none") header("Content-Encoding: $compression"); if ($lod === 0) { @@ -196,6 +198,7 @@ if (startsWith($path, "/maps/")) { $statement->execute(); if ($line = $statement->fetch()) { + header("Cache-Control: public,max-age=86400"); header("Content-Type: ".getMimeType($mapPath)); send($line["value"]); exit;