cache-control (#423)

Change CACHE_MAX_AGE to CACHE_CONTROL in AWS and Cloudflare
This commit is contained in:
Markus Wendorf
2024-07-09 10:11:33 +02:00
committed by GitHub
parent c2a3fcc5e7
commit dd8fdcd37d
4 changed files with 8 additions and 6 deletions

View File

@@ -232,9 +232,9 @@ export const handlerRaw = async (
data = tilePostprocess(data, header.tileType);
}
headers["Cache-Control"] = `public, max-age=${
process.env.CACHE_MAX_AGE || 86400
}`;
headers["Cache-Control"] =
process.env.CACHE_CONTROL || "public, max-age=86400";
headers.ETag = `"${createHash("sha256")
.update(Buffer.from(data))
.digest("hex")}"`;