Skip to content

Open source alternative to Semrush and Ahrefs

Cache hashed build assets for a year (#919)

Carter Smith79ba1665d129
diff --git a/src/public/_headers b/src/public/_headers
new file mode 100644
index 00000000..736d7a1e
--- /dev/null
+++ b/src/public/_headers
@@ -0,0 +1,5 @@
+# Vite content-hashes every file under /assets/ and the HTML is never cached,
+# so a deploy ships new URLs instead of changing these files. Favicons and the
+# manifest keep stable names, so they keep the default revalidating policy.
+/assets/*
+ Cache-Control: public, max-age=31536000, immutable