title: How to redirect to different domain with a cookie in Express js
body: <p>I'm developing a web app using Express on Node. I'm trying to implement a proxy login functionality where an user is directly logged in and redirected to another site after he logs into to my site.</p>
  
  <p>In my routing function I'm writing the following code <br>
  <strong>res.cookie('fanws', 'value' );<br>
  res.redirect('<a href="http://hostname/path" rel="noreferrer">http://hostname/path</a>');</strong> // another site</p>
  
  <p>I used the debugger in chrome and saw that the cookie is not getting added in the redirected page.</p>
  
  <p>I'm running the app on localhost and the site which i'm redirecting to is hosted on another server on local network.</p>
  
  <p>What should I do to add the cookie on the redirected path?</p>