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
You can activate the proper header in PHP with this:
header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE"); header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, X-Requested-With");