title: How to solve CORS redirection with express js router?
body: <p>I'm trying to implement OAuth2 authentication. When I try to send Authorization code I get this error:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load link1.
    Redirect from link1 to link2
    has been blocked by CORS policy: Request requires preflight, which is
    disallowed to follow cross-origin redirect.</p>
  </blockquote>
  
  <p>My req/rsp looks like this:</p>
  
  <blockquote>
    <p>General: 
    Request URL:link1 
    Request Method:OPTIONS Status Code:204 No
    Content Remote Address:</p>
    
    <p>Response Headers: HTTP/1.1 204 No Content X-Powered-By: Express
    Access-Control-Allow-Origin: * Access-Control-Allow-Methods:
    GET,HEAD,PUT,PATCH,POST,DELETE Access-Control-Allow-Headers:
    content-type, sessionid Date: </p>
    
    <p>Request Headers: OPTIONS /authorize HTTP/1.1 Host: host Connection:
    keep-alive Access-Control-Request-Method: POST Origin: origin_link
    User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
    like Gecko) Chrome/56.0.2924.76 Safari/537.36
    Access-Control-Request-Headers: content-type, sessionid Accept: <em>/</em>
    Referer: origin_link/dialog Accept-Encoding: gzip, deflate, sdch, br
    Accept-Language: en-US,en;q=0.8</p>
  </blockquote>