Skip to content

Commit e9c4022

Browse files
committed
More cache headers
1 parent 98648c7 commit e9c4022

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tasks/generateHeaders.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,23 @@ headers.forEach((h) => {
4444
});
4545
});
4646

47-
// Headers for PMTiles, 1 week
47+
// Headers for assets, 1 month, 1 week
4848
content += `
49+
/*.css
50+
Cache-Control: public, max-age=2592000
51+
/*.js
52+
Cache-Control: public, max-age=2592000
53+
/*.svg
54+
Cache-Control: public, max-age=2592000
55+
/*.png
56+
Cache-Control: public, max-age=2592000
57+
/*.jpg
58+
Cache-Control: public, max-age=2592000
59+
4960
/*.pmtiles
5061
Cache-Control: public, max-age=604800
62+
/*.geojson
63+
Cache-Control: public, max-age=604800
5164
`;
5265

5366
fs.writeFileSync('dist/_headers', content);

0 commit comments

Comments
 (0)