Categories
How to correctly set cors for all paths in express?
How to set cors for all routers at once?
Answer the question
In order to leave comments, you need to log in
app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next(); });
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question