Closed amir-rahnama closed 5 years ago
Change your middleware function from
function(req, res, next) { res.setHeader('Access-Control-Allow-Origin', '*'); next(); }
to
function(req, res, next) { res.setHeader('Access-Control-Allow-Origin', '*'); return next(); }
Here is my config file but for some strange reasons,
although the code gets executed, the requests still don't have the headers.