From 93df58cc4865af9046d2b31e03fa37d3ae54e45b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 22 Feb 2018 11:54:17 +0100 Subject: Fix service worker registration --- server/controllers/client.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server/controllers') diff --git a/server/controllers/client.ts b/server/controllers/client.ts index f07e421b4..f5124c55b 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -12,6 +12,7 @@ const clientsRouter = express.Router() const distPath = join(root(), 'client', 'dist') const assetsImagesPath = join(root(), 'client', 'dist', 'client', 'assets', 'images') const manifestPath = join(root(), 'client', 'dist', 'manifest.json') +const serviceWorkerPath = join(root(), 'client', 'dist', 'ngsw-worker.js') const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') const indexPath = join(distPath, 'index.html') @@ -27,6 +28,7 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, // Static HTML/CSS/JS client files clientsRouter.use('/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE })) +clientsRouter.use('/ngsw-worker.js', express.static(serviceWorkerPath, { maxAge: STATIC_MAX_AGE })) clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) -- cgit v1.2.3