June 2018
Beginner to intermediate
394 pages
9h 2m
English
Headers can be custom and also file-specific. In the hosting project firebase.json file, will have this headers section:
"hosting": { // Add the "headers" section within "hosting". "headers": [ { "source" : "**/*.@(eot|otf|ttf|ttc|woff|font.css)", "headers" : [ { "key" : "Access-Control-Allow-Origin", "value" : "*" } ] }, { "source" : "**/*.@(jpg|jpeg|gif|png)", "headers" : [ { "key" : "Cache-Control", "value" : "max-age=7200" } ] }, { // Sets the cache header for 404 pages to cache for 5 minutes "source" : "404.html", "headers" : [ { "key" : "Cache-Control", "value" : "max-age=300" } ] } ] }
Read now
Unlock full access