title: error on response redirect in expressjs
body: <p>I am redirecting api url to REST api url. Code is as below</p>
  
  <pre><code>app.use('/api/*', function(req, res, next) {
      res.header("Access-Control-Allow-Origin", "*");
      res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS');
      res.header("Access-Control-Allow-Headers", "Origin");
      res.header("Access-Control-Allow-Headers", "X-Requested-With");
      res.header("Access-Control-Allow-Headers", "Content-Type");
      res.header("Access-Control-Allow-Headers", "Accept");
      console.log("Inside API", req.url);
      res.redirect(http://myrestapi/'+req.url);
  });
  </code></pre>
  
  <p>While post request of <a href="http://localhost:3000/api/login" rel="nofollow noreferrer">http://localhost:3000/api/login</a> getting below error</p>
  
  <p>No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>' is therefore not allowed access.
  Please suggest me where i am wrong</p>