diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ if (missed.length !== 0) { | |||
29 | throw new Error('Your configuration files miss keys: ' + missed) | 29 | throw new Error('Your configuration files miss keys: ' + missed) |
30 | } | 30 | } |
31 | 31 | ||
32 | import { API_VERSION, CONFIG, STATIC_PATHS } from './server/initializers/constants' | 32 | import { ACCEPT_HEADERS, API_VERSION, CONFIG, STATIC_PATHS } from './server/initializers/constants' |
33 | checkFFmpeg(CONFIG) | 33 | checkFFmpeg(CONFIG) |
34 | 34 | ||
35 | const errorMessage = checkConfig() | 35 | const errorMessage = checkConfig() |
@@ -129,7 +129,7 @@ app.use('/', staticRouter) | |||
129 | 129 | ||
130 | // Always serve index client page (the client is a single page application, let it handle routing) | 130 | // Always serve index client page (the client is a single page application, let it handle routing) |
131 | app.use('/*', function (req, res) { | 131 | app.use('/*', function (req, res) { |
132 | if (req.accepts('html')) { | 132 | if (req.accepts(ACCEPT_HEADERS) === 'html') { |
133 | return res.sendFile(path.join(__dirname, '../client/dist/index.html')) | 133 | return res.sendFile(path.join(__dirname, '../client/dist/index.html')) |
134 | } | 134 | } |
135 | 135 | ||