From 2669b27a08941703fcefcdd4d69025111fb5adf3 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Thu, 21 Jul 2016 22:59:39 -0700 Subject: [PATCH] regex for sw --- server/static/service-worker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/static/service-worker.js b/server/static/service-worker.js index 60aa8263..2b2a9902 100644 --- a/server/static/service-worker.js +++ b/server/static/service-worker.js @@ -56,12 +56,12 @@ Cache.prototype.addAll||(Cache.prototype.addAll=function(t){function e(t){this.n // Index page and assets global.toolbox.router.get('/', global.toolbox.cacheFirst); global.toolbox.router.get(/\/dashboard/, global.toolbox.cacheFirst); - global.toolbox.router.get(/\/atlas/, global.toolbox.cacheFirst); - global.toolbox.router.get(/\/documents\//, global.toolbox.cacheFirst); + global.toolbox.router.get(/\/atlas\/\/[\w]+/, global.toolbox.cacheFirst); + global.toolbox.router.get(/\/documents\/\/[\w]+/, global.toolbox.cacheFirst); global.toolbox.router.get(/\/static\//, global.toolbox.cacheFirst); // API get calls - global.toolbox.router.post(/\/api\//, global.toolbox.networkFirst); + global.toolbox.router.post(/\/api\/[\w\.]+/, global.toolbox.networkFirst); global.toolbox.router.default = global.toolbox.networkFirst;