X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.js;fp=server.js;h=cc644e6b3a90791109cffae9b4a5078231dc0e18;hb=4d8f08f9c825c35ed3e05ce92457c2fc2e2194c6;hp=620610357e09b4e62c1ee281af4a10116285433e;hpb=459517d3c026aaa694be2be5f5b2f66a9df49399;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git diff --git a/server.js b/server.js index 6206103..cc644e6 100755 --- a/server.js +++ b/server.js @@ -93,7 +93,7 @@ app.use('/', function welcomePage(req, res, next) { }); app.use('/', function (req, res, next) { if (config.folderListingEnabled) return next(); - res.sendFile(__dirname + '/frontend/404.html'); + res.status(404).sendFile(__dirname + '/frontend/404.html'); }); app.use('/', serveIndex(ROOT_FOLDER, { icons: true })); app.use(lastMile());