diff --git a/index.js b/index.js index cb72f4f..4822a7e 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ const sslOptions = { app.set('domain', DOMAIN) app.set('port', process.env.PORT || PORT) app.set('port-https', process.env.PORT_HTTPS || PORT_HTTPS) -app.use(morgan('combined')) +app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status Accepts ":req[accept]" ":referrer" ":user-agent"')) app.use(history({ index: '/web/index.html', rewrites: [ diff --git a/net/security.js b/net/security.js index f5005b5..e6ac560 100644 --- a/net/security.js +++ b/net/security.js @@ -35,9 +35,10 @@ async function verifySignature (req, res, next) { } next() } catch (err) { - if (req.body.type === 'Delete' && err.mesage.startsWith('410')) { + if (req.body.type === 'Delete' && err.message.startsWith('410')) { // user delete message that can't be verified because we don't have the user cached - res.status(200).send() + console.log('Unverifiable delete') + return res.status(200).send() } console.log('error during signature verification', err.message, req.body) return res.status(500).send()