Created
January 28, 2020 12:02
-
-
Save jirawatee/b5925fd21041dc34e4e92c041c3eecc2 to your computer and use it in GitHub Desktop.
Configuration in Firebase Hosting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"functions": { | |
"predeploy": [ | |
"npm --prefix \"$RESOURCE_DIR\" run lint" | |
] | |
}, | |
"hosting": { | |
"public": "public", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"headers": [ | |
{ | |
"source": "**/*.@(eot|otf|ttf|ttc|woff|font.css)", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "max-age=31536000" // 60 * 60 * 24 * 365 | |
} | |
] | |
}, | |
{ | |
"source": "**/*.@(jpg|jpeg|gif|png)", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "max-age=604800" // 60 * 60 * 24 * 7 | |
} | |
] | |
}, | |
{ | |
"source": "**/*.@(css|js)", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "max-age=86400" // 60 * 60 * 24 | |
} | |
] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment