- logger.error('Signature is not okay in body for %s.', signatureObject.host)
- return res.sendStatus(403)
- })
- .catch(err => {
- logger.error('Cannot get signed host in body.', { error: err.stack, signature: signatureObject.signature })
- return res.sendStatus(500)
- })
+ return next()
+ }
+
+ logger.error('Signature is not okay in body for %s.', signatureObject.host)
+ return res.sendStatus(403)
+ } catch (err) {
+ logger.error('Cannot get signed host in body.', { error: err.stack, signature: signatureObject.signature })
+ return res.sendStatus(500)
+ }