diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/client.ts | 8 |
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) { | |||
47 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) | 47 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) |
48 | clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) | 48 | clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) |
49 | 49 | ||
50 | clientsRouter.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 |
51 | clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { | 59 | clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { |
52 | res.sendStatus(404) | 60 | res.sendStatus(404) |