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\')
Apparently cors module didn't work.
Using the hints given above I used the following code:
if (req.method === "OPTIONS") { res.header('Access-Control-Allow-Origin', req.headers.origin); } else { res.header('Access-Control-Allow-Origin', '*'); }
This did the trick.