Cache authentication configuration in IndividualLocalAuth && Hosted case

This commit is contained in:
Steve Sanderson 2020-02-26 15:49:23 +00:00
parent 90d7d0b368
commit d9ed5166ff
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,12 @@ async function onInstall(event) {
.filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url)))
.filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url)))
.map(asset => new Request(asset.url, { integrity: asset.hash }));
//#if(IndividualLocalAuth && Hosted)
// Also cache authentication configuration
assetsRequests.push(new Request('_configuration/ComponentsWebAssembly-CSharp.Client'));
//#endif
await caches.open(cacheName).then(cache => cache.addAll(assetsRequests));
}