mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Proper 404 handling
This commit is contained in:
parent
d706a21117
commit
4a1cad43c8
4 changed files with 8 additions and 20 deletions
|
@ -54,14 +54,11 @@ app.get('/', function (req, res) {
|
|||
})
|
||||
|
||||
app.get('*', function (req, res) {
|
||||
res.render('shared/404')
|
||||
res.status(404)
|
||||
// utils.AppendToFile(logger.GetDateString() + ": " + "404 GET", logFile);
|
||||
res.status(404).render('shared/404')
|
||||
})
|
||||
|
||||
app.post('*', function (req, res) {
|
||||
res.status(404)
|
||||
// utils.AppendToFile(logger.GetDateString() + ": " + "404 POST", logFile);
|
||||
res.status(404).render('shared/404')
|
||||
})
|
||||
|
||||
exports.app = app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue