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:
parent
b1e89249b4
commit
f1a88b7ff5
4 changed files with 26 additions and 7 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue