Estoy tratando de anular el req pero parece que no funciona
por ejemplo
app.use((req, res, next) => { req.hostname = req.headers['x-forwarded-host'] || req.hostname; req.test = req.headers['x-forwarded-proto'] || req.protocol; req.protocol = req.headers['x-forwarded-proto'] || req.protocol; console.log(req.hostname); console.log(req.test); console.log(req.protocol); next(); })Si tengo
x-reenviado-host = 'google.com' x-reenviado-proto = 'https'
tendré
req.hostname = '127.0.0.1' req.test = 'https' req.protocol = 'http'