about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/service_worker/entry.js15
-rw-r--r--app/serializers/manifest_serializer.rb6
2 files changed, 6 insertions, 15 deletions
diff --git a/app/javascript/mastodon/service_worker/entry.js b/app/javascript/mastodon/service_worker/entry.js
index e4c66cc00..4ec16d8e2 100644
--- a/app/javascript/mastodon/service_worker/entry.js
+++ b/app/javascript/mastodon/service_worker/entry.js
@@ -60,24 +60,15 @@ registerRoute(
 self.addEventListener('install', function(event) {
   event.waitUntil(Promise.all([openWebCache(), fetchRoot()]).then(([cache, root]) => cache.put('/', root)));
 });
+
 self.addEventListener('activate', function(event) {
   event.waitUntil(self.clients.claim());
 });
+
 self.addEventListener('fetch', function(event) {
   const url = new URL(event.request.url);
 
-  if (url.pathname.startsWith('/web/')) {
-    const asyncResponse = fetchRoot();
-    const asyncCache = openWebCache();
-
-    event.respondWith(asyncResponse.then(
-      response => {
-        const clonedResponse = response.clone();
-        asyncCache.then(cache => cache.put('/', clonedResponse)).catch();
-        return response;
-      },
-      () => asyncCache.then(cache => cache.match('/'))));
-  } else if (url.pathname === '/auth/sign_out') {
+  if (url.pathname === '/auth/sign_out') {
     const asyncResponse = fetch(event.request);
     const asyncCache = openWebCache();
 
diff --git a/app/serializers/manifest_serializer.rb b/app/serializers/manifest_serializer.rb
index 6b5296480..fb7ab563c 100644
--- a/app/serializers/manifest_serializer.rb
+++ b/app/serializers/manifest_serializer.rb
@@ -52,7 +52,7 @@ class ManifestSerializer < ActiveModel::Serializer
   end
 
   def start_url
-    '/web/home'
+    '/home'
   end
 
   def scope
@@ -77,11 +77,11 @@ class ManifestSerializer < ActiveModel::Serializer
     [
       {
         name: 'Compose new post',
-        url: '/web/publish',
+        url: '/publish',
       },
       {
         name: 'Notifications',
-        url: '/web/notifications',
+        url: '/notifications',
       },
     ]
   end