I have my express server running on http://localhost:3000 (I call this web-server) I have another application running on localhost:8100 (I call this simply 'app')
When my app makes a call to the webserver I receive the message:
"XMLHTTPReqeust cannot load http://localhost:3000/auth/facebook. Response to preflight request doesn't pass access control check. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' when the credentials flag is true. Origin 'http://localhost:81000' is therefore not allowed acecss"
This message shows up in the browser console.
I have setup the following options in the middleware of my node webserver
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Methods', 'GET,PUT, POST,DELETE');
After reading few stackoverfow questions, I also added the following:
res.header('Access-Control-Allow-Origin', 'http://localhost:8100');
however this does not resolve the issue.