aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r--server/controllers/client.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index 4b37b5fa6..b153f6086 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -47,6 +47,14 @@ for (const staticClientFile of staticClientFiles) {
47clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) 47clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE }))
48clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) 48clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE }))
49 49
50clientsRouter.use('/client/locales/:locale/:file.json', function (req, res) {
51 if (req.params.locale === 'fr' && req.params.file === 'player') {
52 return res.sendFile(join(__dirname, '../../../client/dist/locale/player_fr.json'))
53 }
54
55 return res.sendStatus(404)
56})
57
50// 404 for static files not found 58// 404 for static files not found
51clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { 59clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => {
52 res.sendStatus(404) 60 res.sendStatus(404)