Add custom headers to 'request' Add custom headers to 'request' express express

Add custom headers to 'request'


Was able to achieve it this way

  app.use('/api', function (req, res) {    let url = config.API_HOST + req.ur    req.headers['someHeader'] = 'someValue'    req.pipe(request(url)).pipe(res)  })


for some weird reasons req.setHeader('someHeader', 'somValue') didn't work for me.

but req.headers['someHeader'] = 'someValue' this worked