From fc93449c2d020028f4988eca66bda7d312abe1ef Mon Sep 17 00:00:00 2001 From: Peter Chapman Date: Tue, 28 Sep 2021 09:30:52 +1300 Subject: [PATCH] Fixed about not working --- GoToBible.Web/Client/Pages/Index.razor | 2 +- GoToBible.Web/Client/wwwroot/service-worker.published.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/GoToBible.Web/Client/Pages/Index.razor b/GoToBible.Web/Client/Pages/Index.razor index 6aa8f02..4e3eb00 100644 --- a/GoToBible.Web/Client/Pages/Index.razor +++ b/GoToBible.Web/Client/Pages/Index.razor @@ -108,7 +108,7 @@ - + About diff --git a/GoToBible.Web/Client/wwwroot/service-worker.published.js b/GoToBible.Web/Client/wwwroot/service-worker.published.js index 36f5de5..d00c80b 100644 --- a/GoToBible.Web/Client/wwwroot/service-worker.published.js +++ b/GoToBible.Web/Client/wwwroot/service-worker.published.js @@ -37,7 +37,8 @@ async function onFetch(event) { if (event.request.method === 'GET') { // For all navigation requests, try to serve index.html from cache // If you need some URLs to be server-rendered, edit the following check to exclude those URLs - const shouldServeIndexHtml = event.request.mode === 'navigate'; + const shouldServeIndexHtml = event.request.mode === 'navigate' + && !event.request.url.includes('/about/'); const request = shouldServeIndexHtml ? 'index.html' : event.request; const cache = await caches.open(cacheName);