aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server.ts b/server.ts
index 3221c1790..a723dd32b 100644
--- a/server.ts
+++ b/server.ts
@@ -129,7 +129,11 @@ 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 res.sendFile(path.join(__dirname, '../client/dist/index.html')) 132 if (req.accepts('html')) {
133 return res.sendFile(path.join(__dirname, '../client/dist/index.html'))
134 }
135
136 return res.status(404).end()
133}) 137})
134 138
135// ----------- Errors ----------- 139// ----------- Errors -----------