My reasoning is: * any CSS or JS files their name contains their hash — 1 month * anything under img folder might change while keeping name — 1 day * any image anywhere except img folder usually giant photos attached to blog posts, rarely change and if they do, they usually change name as well — 1 month
40 lines
721 B
JSON
40 lines
721 B
JSON
{
|
|
"hosting": {
|
|
"public": "public",
|
|
"ignore": [
|
|
"firebase.json",
|
|
"**/.*",
|
|
"**/node_modules/**"
|
|
],
|
|
"headers": [
|
|
{
|
|
"source": "@(js|css)/*.@(js|css)",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "max-age=2628000"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "img/**",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "max-age=86400"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "!(img)/**/*.@(jpg|jpeg|png|webp)",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "max-age=2628000"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|