I\'m trying to send files to my server with a post request, but when it sends it causes the error:
Request header field Content-Type is not allowed by
If anyone experiences this problem with an express server, add the following middleware
app.use(function(req, res, next) { res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next(); });