diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-08 17:31:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-08 17:31:05 +0100 |
commit | 7193ad1044d2dfad8f929f0951f9a3601c056f67 (patch) | |
tree | e40ab985552696caad2e09861842d043e436fe7d /server/controllers/client.ts | |
parent | 151edeee3a1bff047bda4cdb60d98ad74f627488 (diff) | |
download | PeerTube-7193ad1044d2dfad8f929f0951f9a3601c056f67.tar.gz PeerTube-7193ad1044d2dfad8f929f0951f9a3601c056f67.tar.zst PeerTube-7193ad1044d2dfad8f929f0951f9a3601c056f67.zip |
Add service worker
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r-- | server/controllers/client.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 28b42911a..f07e421b4 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -11,7 +11,7 @@ const clientsRouter = express.Router() | |||
11 | 11 | ||
12 | const distPath = join(root(), 'client', 'dist') | 12 | const distPath = join(root(), 'client', 'dist') |
13 | const assetsImagesPath = join(root(), 'client', 'dist', 'client', 'assets', 'images') | 13 | const assetsImagesPath = join(root(), 'client', 'dist', 'client', 'assets', 'images') |
14 | const manifestPath = join(root(), 'client', 'dist', 'client', 'manifest.json') | 14 | const manifestPath = join(root(), 'client', 'dist', 'manifest.json') |
15 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') | 15 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
16 | const indexPath = join(distPath, 'index.html') | 16 | const indexPath = join(distPath, 'index.html') |
17 | 17 | ||
@@ -26,8 +26,8 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, | |||
26 | }) | 26 | }) |
27 | 27 | ||
28 | // Static HTML/CSS/JS client files | 28 | // Static HTML/CSS/JS client files |
29 | clientsRouter.use('/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE })) | ||
29 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) | 30 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) |
30 | clientsRouter.use('/client/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE })) | ||
31 | clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) | 31 | clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) |
32 | 32 | ||
33 | // 404 for static files not found | 33 | // 404 for static files not found |