mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
fixed content type check, added bit more logging on getnewdata since ep
This commit is contained in:
@@ -264,7 +264,7 @@ Object.keys(modules).forEach(function (key) {
|
||||
})
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
if (req.is('application/json')) {
|
||||
if (req.headers['content-type'] === 'application/json') {
|
||||
res.status(404).end()
|
||||
} else {
|
||||
res.status(404).render('404')
|
||||
@@ -272,7 +272,7 @@ app.get('*', (req, res) => {
|
||||
})
|
||||
|
||||
app.post('*', (req, res) => {
|
||||
if (req.is('application/json')) {
|
||||
if (req.headers['content-type'] === 'application/json') {
|
||||
res.status(404).end()
|
||||
} else {
|
||||
res.status(404).render('404')
|
||||
|
||||
Reference in New Issue
Block a user