Skip to content

Commit 0c89480

Browse files
chore: update firebase.json to add clean URLs, trailing slashes configuration, and cache control headers
1 parent 929e517 commit 0c89480

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

firebase.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,36 @@
66
"**/.*",
77
"**/node_modules/**"
88
],
9+
"cleanUrls": true,
10+
"trailingSlash": false,
911
"rewrites": [
12+
{
13+
"source": "/blog/**",
14+
"destination": "/blog/[...slug].html"
15+
},
16+
{
17+
"source": "/tags/**",
18+
"destination": "/tags/[tag].html"
19+
}
20+
],
21+
"headers": [
1022
{
1123
"source": "**",
12-
"destination": "/index.html"
24+
"headers": [
25+
{
26+
"key": "Cache-Control",
27+
"value": "public, max-age=0, must-revalidate"
28+
}
29+
]
30+
},
31+
{
32+
"source": "**/*.@(jpg|jpeg|gif|png|svg|webp|js|css|eot|otf|ttf|ttc|woff|woff2|font.css)",
33+
"headers": [
34+
{
35+
"key": "Cache-Control",
36+
"value": "public, max-age=31536000, immutable"
37+
}
38+
]
1339
}
1440
]
1541
}

0 commit comments

Comments
 (0)