updated config file environment
This commit is contained in:
@@ -16,7 +16,7 @@ importScripts('../statics/js/workbox-sw.js');
|
||||
|
||||
|
||||
let port = 3000;
|
||||
if (self.location.hostname === 'test.freeplanet.app') {
|
||||
if (self.location.hostname.startsWith('test')) {
|
||||
port = 3001;
|
||||
}
|
||||
// console.log('SW-06 1');
|
||||
@@ -68,7 +68,7 @@ if (workbox) {
|
||||
const debug = false;
|
||||
workbox.setConfig({ debug: debug });
|
||||
|
||||
workbox.core.setCacheNameDetails({ prefix: "freeplanet" });
|
||||
workbox.core.setCacheNameDetails({ prefix: self.location.hostname });
|
||||
|
||||
/**
|
||||
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
|
||||
@@ -281,7 +281,7 @@ if (workbox) {
|
||||
|
||||
// Storage
|
||||
workbox.routing.registerRoute(
|
||||
new RegExp(/.*(?:storage\.freeplanet)\.app.*$/),
|
||||
new RegExp(/.*(?:storage.*$/),
|
||||
workbox.strategies.staleWhileRevalidate({
|
||||
cacheName: 'storage',
|
||||
plugins: [
|
||||
|
||||
Reference in New Issue
Block a user