diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-08 10:09:41 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-08 10:09:41 +0100 |
commit | 5980a252a7f71e3e79a1b7ca39a63eb4dbfca9e4 (patch) | |
tree | 22620f7c72a95a2e5d3e61dff20628fe1d61ca4c /server/controllers | |
parent | 6583edee61b3e2726c5209b6da311d758088d619 (diff) | |
download | PeerTube-5980a252a7f71e3e79a1b7ca39a63eb4dbfca9e4.tar.gz PeerTube-5980a252a7f71e3e79a1b7ca39a63eb4dbfca9e4.tar.zst PeerTube-5980a252a7f71e3e79a1b7ca39a63eb4dbfca9e4.zip |
Server the manifest too
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/client.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index c85bd8a5e..28b42911a 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -11,6 +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 embedPath = join(distPath, 'standalone', 'videos', 'embed.html') | 15 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
15 | const indexPath = join(distPath, 'index.html') | 16 | const indexPath = join(distPath, 'index.html') |
16 | 17 | ||
@@ -26,6 +27,7 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, | |||
26 | 27 | ||
27 | // Static HTML/CSS/JS client files | 28 | // Static HTML/CSS/JS client files |
28 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) | 29 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) |
30 | clientsRouter.use('/client/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE })) | ||
29 | 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 })) |
30 | 32 | ||
31 | // 404 for static files not found | 33 | // 404 for static files not found |