Which of the following responses to a preflight request will allow a browser to make a cross-origin call to upload a file?

  • Access-Control-Allow-Origin: *
  • Access-Control-Allow-Methods: POST
  • Access-Control-Allow-Headers: Authorization
  • Access-Control-Allow-Credentials: true
To enable cross-origin file uploads, you need to set Access-Control-Allow-Credentials to true, indicating that credentials like cookies are allowed. The other options are necessary but don't specifically address file uploads.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *