Web Security · Middle · Question 25 of 75

How can checking the Origin header help against CSRF?

Explanation

Browser JavaScript can't forge Origin. Treat a missing header carefully, and combine the check with SameSite cookies or tokens.

Further reading

Problem with a question

Web Security · Middle · question 25

Test yourself

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

Take this quiz