diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 13:16:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-30 13:16:23 +0100 |
commit | 98ec8b8e73a918d5680e6f13aaef56ca8756c2a8 (patch) | |
tree | a61c6797188227d1d07e3d9f91b8ea09684406c7 /server.ts | |
parent | 1b5b10d13152d704d2396a1e53d56aba1a8e7e03 (diff) | |
download | PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.tar.gz PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.tar.zst PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.zip |
Fix lint
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 ----------- |