feat: add debug logs to middleware

This commit is contained in:
José Oliveira 2021-09-06 13:39:15 +01:00
parent e952682917
commit d41e5af638

View file

@ -599,6 +599,7 @@ function sha256 (buf) {
} }
function populateDeviceId (req, res, next) { function populateDeviceId (req, res, next) {
console.log(`DEBUG LOG - Method: ${req.method} Path: ${req.path}`)
const deviceId = _.isFunction(req.connection.getPeerCertificate) const deviceId = _.isFunction(req.connection.getPeerCertificate)
? sha256(req.connection.getPeerCertificate().raw) ? sha256(req.connection.getPeerCertificate().raw)
: null : null