more service workers

This commit is contained in:
Jori Lallo 2016-07-21 22:31:58 -07:00
parent faf98a9d62
commit abaf6043ce
1 changed files with 6 additions and 1 deletions

View File

@ -73,10 +73,15 @@ 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/:id', global.toolbox.cacheFirst);
global.toolbox.router.get('/documents/:id', 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/documents.list', global.toolbox.networkFirst);
global.toolbox.router.post('/api/documents.info', global.toolbox.networkFirst);
global.toolbox.router.post('/api/atlases.list', global.toolbox.networkFirst);
global.toolbox.router.post('/api/atlases.info', global.toolbox.networkFirst);
global.toolbox.router.default = global.toolbox.networkFirst;