fixed content type check, added bit more logging on getnewdata since ep

This commit is contained in:
mrfry 2023-04-13 16:01:38 +02:00
parent b1e89249b4
commit f1a88b7ff5
4 changed files with 26 additions and 7 deletions

View file

@ -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')