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
This commit is contained in:
Jakob Ackermann 2021-06-16 10:15:28 +02:00 committed by Copybot
parent a6cce9d2f6
commit 28fafffef3

View file

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