Which header is crucial for making a CORS request to a different domain using HttpClient?

  • 'Access-Control-Allow-Origin'
  • 'Authorization'
  • 'Content-Type'
  • 'User-Agent'
The 'Access-Control-Allow-Origin' header is crucial for enabling Cross-Origin Resource Sharing (CORS) when making requests to a different domain. It specifies which origins are permitted to access the requested resource, allowing for secure cross-domain communication.
Add your answer
Loading...

Leave a comment

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