title: Problem with EXPRESS and CORS - Access-Control-Allow-Origin
body: <p>When I pass a single url to my Cors options, my API return the Access-Control-Allow-Origin with this url:</p>
  <pre><code> app.use(cors({
    origin: 'https://fakeUrl.net/',
    optionsSuccessStatus: 200,
  }));  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/rvZ9u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rvZ9u.png" alt="Header Exemple" /></a></p>
  <p>But when I pass a list, the express don't return the header:</p>
  <pre><code> var allowedOrigins = ['https://fakeUrl.net','https://fakeUrl2.net/'];
  
  app.use(cors({
    origin: function(origin: any, callback: any){
      if(!origin){
        console.log('Cors indefinido: ' + origin);
        return callback(null, true);
      }
      if(allowedOrigins.indexOf(origin) === -1){
        console.log('Cors fora da lista: ' + origin);
        var msg = 'The CORS policy for this site does not ' +
                  'allow access from the specified Origin. Return 12221511';
        return callback(new Error(msg), false);
      }
      console.log('Cors dentro da lista: ' + origin);
      return callback(null, true);
    },
    optionsSuccessStatus: 200,
  }));  
  </code></pre>
  <p>Or like this:</p>
  <pre><code> app.use(cors({
    origin: ['https://fakeUrl.net','https://fakeUrl2.net/'],
    optionsSuccessStatus: 200,
  }));  
  </code></pre>
  <p>Just don't Work.</p>
  <p>I believe it's a problem in Express, I already open a Ticket on github for the team, but it's closed now.</p>
  <p>Anyone can handly it problem?</p>