aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.ts b/server.ts
index a723dd32b..39caf8996 100644
--- a/server.ts
+++ b/server.ts
@@ -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
32import { API_VERSION, CONFIG, STATIC_PATHS } from './server/initializers/constants' 32import { ACCEPT_HEADERS, API_VERSION, CONFIG, STATIC_PATHS } from './server/initializers/constants'
33checkFFmpeg(CONFIG) 33checkFFmpeg(CONFIG)
34 34
35const errorMessage = checkConfig() 35const 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)
131app.use('/*', function (req, res) { 131app.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