Stop service worker interfering with Identity UI (#19400)
This commit is contained in:
parent
252576df5a
commit
0216ca2086
|
|
@ -43,7 +43,13 @@ 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
|
||||
//#if(IndividualLocalAuth && Hosted)
|
||||
const shouldServeIndexHtml = event.request.mode === 'navigate'
|
||||
&& !event.request.url.includes('/connect/')
|
||||
&& !event.request.url.includes('/Identity/');
|
||||
//#else
|
||||
const shouldServeIndexHtml = event.request.mode === 'navigate';
|
||||
//#endif
|
||||
|
||||
const request = shouldServeIndexHtml ? 'index.html' : event.request;
|
||||
const cache = await caches.open(cacheName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue