Эх сурвалжийг харах

Merge pull request #4209 from overleaf/jpa-service-worker-24h-cache

[Server] lower the cache duration for the service worker to 24h

GitOrigin-RevId: b67b030722812a30d7c2fc98f9183538307f9a1a
Jakob Ackermann 5 жил өмнө
parent
commit
28fafffef3

+ 6 - 0
services/web/app/src/infrastructure/Server.js

@@ -81,6 +81,12 @@ if (Settings.exposeHostname) {
   })
   })
 }
 }
 
 
+webRouter.get(
+  '/serviceWorker.js',
+  express.static(Path.join(__dirname, '/../../../public'), {
+    maxAge: oneDayInMilliseconds,
+  })
+)
 webRouter.use(
 webRouter.use(
   express.static(Path.join(__dirname, '/../../../public'), {
   express.static(Path.join(__dirname, '/../../../public'), {
     maxAge: STATIC_CACHE_AGE,
     maxAge: STATIC_CACHE_AGE,