I am trying to allow access from everywhere.
I have tried using app middleware:
app.use(function (req, res, next) { res.setHeader(\"Access-Control-Allo
Following other's answers, this worked for me:
res.setHeader("Access-Control-Allow-Origin", 'http://myDomain:8080'); res.setHeader('Access-Control-Allow-Methods', 'POST,GET,OPTIONS,PUT,DELETE'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type,Accept');