diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-11 11:06:32 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-12-11 11:06:32 +0100 |
commit | fada8d75550dc7365f7e18ee1569b9406251d660 (patch) | |
tree | db9dc01c18693824f83fce5020f4c1f3ae7c0865 /server/controllers/client.ts | |
parent | 492fd28167f770d79a430fc57451b5a9e075d8e7 (diff) | |
parent | c2830fa8f84f61462098bf36add824f89436dfa9 (diff) | |
download | PeerTube-fada8d75550dc7365f7e18ee1569b9406251d660.tar.gz PeerTube-fada8d75550dc7365f7e18ee1569b9406251d660.tar.zst PeerTube-fada8d75550dc7365f7e18ee1569b9406251d660.zip |
Merge branch 'feature/design' into develop
Diffstat (limited to 'server/controllers/client.ts')
-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 64e5829ca..f474c4282 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -18,6 +18,7 @@ import { VideoInstance } from '../models' | |||
18 | const clientsRouter = express.Router() | 18 | const clientsRouter = express.Router() |
19 | 19 | ||
20 | const distPath = join(root(), 'client', 'dist') | 20 | const distPath = join(root(), 'client', 'dist') |
21 | const assetsImagesPath = join(root(), 'client', 'dist', 'assets', 'images') | ||
21 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') | 22 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
22 | const indexPath = join(distPath, 'index.html') | 23 | const indexPath = join(distPath, 'index.html') |
23 | 24 | ||
@@ -33,6 +34,7 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, | |||
33 | 34 | ||
34 | // Static HTML/CSS/JS client files | 35 | // Static HTML/CSS/JS client files |
35 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) | 36 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) |
37 | clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) | ||
36 | 38 | ||
37 | // 404 for static files not found | 39 | // 404 for static files not found |
38 | clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { | 40 | clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { |