patek.cz/firebase.json
Vojtěch Káně ae3148337b Set Cache-Control headers for certain content on Firebase
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
2020-10-07 13:36:17 +02:00

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"
}
]
}
]
}
}