Skip to content

Instantly share code, notes, and snippets.

@evdama
Created July 11, 2019 09:46
Show Gist options
  • Select an option

  • Save evdama/b143a856a1d7255c6db859daec6a7ffd to your computer and use it in GitHub Desktop.

Select an option

Save evdama/b143a856a1d7255c6db859daec6a7ffd to your computer and use it in GitHub Desktop.
caching for static contents using firebase headers
{
"functions": {
"predeploy": [
"node predeploy.js"
],
"source": "functions"
},
"firestore": {
"rules": "config/firestore.rules",
"indexes": "config/firestore.indexes.json"
},
"hosting": {
"public": "static",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**",
"./__sapper__",
"./src"
],
"rewrites": [
{
"source": "**",
"function": "ssr"
}
],
"headers": [ {
"source": "**",
"headers": [ {
"key": "Cache-Control",
"value": "public, max-age=604800, must-revalidate, s-maxage=604800, proxy-revalidate, stale-while-revalidate=86400, stale-if-error=604800"
} ]
} ]
},
"storage": {
"rules": "config/storage.rules"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment