From 48b11de774c1b85140bd033f258ca36c43b7fad0 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 13 Jul 2020 16:52:26 +0530 Subject: [PATCH] update firebase hosting link to functions --- firebase.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/firebase.json b/firebase.json index 22c0513af..b1bcd5195 100644 --- a/firebase.json +++ b/firebase.json @@ -7,6 +7,53 @@ "firebase.json", "**/node_modules/**" ], + "headers": [ + { + "source": "**/*", + "headers": [ + { + "key": "cache-control", + "value": "cache-control: public, max-age=0, must-revalidate" + } + ] + }, + { + "source": "static/**", + "headers": [ + { + "key": "cache-control", + "value": "public, max-age=31536000, immutable" + } + ] + }, + { + "source": "**/*.@(css|js)", + "headers": [ + { + "key": "cache-control", + "value": "public, max-age=31536000, immutable" + } + ] + }, + { + "source": "sw.js", + "headers": [ + { + "key": "cache-control", + "value": "cache-control: public, max-age=0, must-revalidate" + } + ] + }, + { + "source": "page-data/**", + "headers": [ + { + "key": "cache-control", + "value": "cache-control: public, max-age=0, must-revalidate" + } + ] + } + ], "rewrites": [ { "source": "/printSinglePageResume", @@ -15,10 +62,6 @@ { "source": "/printMultiPageResume", "function": "printMultiPageResume" - }, - { - "source": "**", - "destination": "/index.html" } ] }],