Add more cache-control headers to sql.php

This commit is contained in:
Lukas Rieger (Blue) 2024-02-25 02:19:40 +01:00
parent b625af695c
commit ceb31b68eb
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6

View File

@ -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;