title: How to pass headers while doing res.redirect in express js
body: <p>I am working on express js and I need to redirect to a page which needs authentication. This is my code:</p>
  
  <pre><code>router.get('/ren', function(req, res) {
      var username = 'nik',
          password = 'abc123',
          auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
  
      res.redirect('http://localhost:3000/api/oauth2/authorize');
  })
  </code></pre>
  
  <p>How can I set headers to this redirect command?</p>