Created
August 11, 2017 16:53
-
-
Save digitalgeneralist/1179e7c0b915fea280e763c05401ca5f to your computer and use it in GitHub Desktop.
Hosting React App on Firebase, PageSpeed Tools Insights needs Cache-Control for your js files (min. 1 week)
This file contains 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
{ | |
"hosting": { | |
"public": "public", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"headers": [ { | |
"source" : "**/*.@(eot|otf|ttf|ttc|woff|font.css)", | |
"headers" : [ { | |
"key" : "Access-Control-Allow-Origin", | |
"value" : "*" | |
} ] | |
}, { | |
"source" : "**/*.@(js|jpg|jpeg|gif|png)", | |
"headers" : [ { | |
"key" : "Cache-Control", | |
"value" : "max-age=691200" | |
} ] | |
}, { | |
"source" : "404.html", | |
"headers" : [ { | |
"key" : "Cache-Control", | |
"value" : "max-age=300" | |
} ] | |
} ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment