diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |
131 | app.use('/*', function (req, res) { | 131 | app.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 ----------- |