Angular · Senior · Question 35 of 75

How does HttpClient help protect against CSRF?

Explanation

The server must set the cookie and verify the header. Angular doesn't add the header to GET/HEAD requests or absolute URLs to avoid leaking the token to other domains.

Further reading

Problem with a question

Angular · Senior · question 35

Test yourself

Take the Angular · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz