mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
cache-control (#423)
Change CACHE_MAX_AGE to CACHE_CONTROL in AWS and Cloudflare
This commit is contained in:
1
serverless/aws/.gitignore
vendored
1
serverless/aws/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
dist
|
||||
node_modules
|
||||
@@ -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")}"`;
|
||||
|
||||
Reference in New Issue
Block a user