Updated, Added all non webapp routes for service worker

This commit is contained in:
mgabdev 2019-07-02 19:01:24 -04:00
parent 346a14635f
commit 1c694c90d3
1 changed files with 24 additions and 6 deletions

View File

@ -42,12 +42,30 @@ self.addEventListener('fetch', function(event) {
return response;
}));
} else if (
url.pathname.startsWith('/system/') ||
url.pathname.startsWith('/api/') ||
url.pathname.startsWith('/settings/') ||
url.pathname.startsWith('/media/') ||
url.pathname.startsWith('/admin/') ||
url.pathname.startsWith('/about/')) {
url.pathname.startsWith('/system') ||
url.pathname.startsWith('/api') ||
url.pathname.startsWith('/settings') ||
url.pathname.startsWith('/media') ||
url.pathname.startsWith('/admin') ||
url.pathname.startsWith('/about') ||
url.pathname.startsWith('/auth') ||
url.pathname.startsWith('/oauth') ||
url.pathname.startsWith('/invites') ||
url.pathname.startsWith('/pghero') ||
url.pathname.startsWith('/sidekiq') ||
url.pathname.startsWith('/filters') ||
url.pathname.startsWith('/tags') ||
url.pathname.startsWith('/emojis') ||
url.pathname.startsWith('/inbox') ||
url.pathname.startsWith('/accounts') ||
url.pathname.startsWith('/user') ||
url.pathname.startsWith('/users') ||
url.pathname.startsWith('/src') ||
url.pathname.startsWith('/public') ||
url.pathname.startsWith('/avatars') ||
url.pathname.startsWith('/authorize_follow') ||
url.pathname.startsWith('/media_proxy') ||
url.pathname.startsWith('/relationships')) {
//non-webapp routes
} else if (url.pathname.startsWith('/')) {
// : TODO : if is /web