aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-30 13:16:23 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-30 13:16:23 +0100
commit98ec8b8e73a918d5680e6f13aaef56ca8756c2a8 (patch)
treea61c6797188227d1d07e3d9f91b8ea09684406c7 /server.ts
parent1b5b10d13152d704d2396a1e53d56aba1a8e7e03 (diff)
downloadPeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.tar.gz
PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.tar.zst
PeerTube-98ec8b8e73a918d5680e6f13aaef56ca8756c2a8.zip
Fix lint
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 -----------