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.
Loading...
Related Quiz
- Which of the following accurately describes Non-Blocking I/O in Node.js?
- What is the main purpose of using 'describe' and 'it' blocks in Mocha?
- To serve static files such as images, CSS files, and JavaScript files, a special folder called ______ is commonly used in Express.js.
- Which of the following ESLint rules enforces consistent indentation in your code?
- You are implementing a Single Sign-On (SSO) solution for various microservices in your organization. How would you design the OAuth flows to ensure secure and seamless access to all services for the end-users?