Web Security · Middle · Question 27 of 75

An API accepts only Content-Type: application/json. Why does that make classic CSRF harder?

Explanation

This only holds if the server really rejects other content types. Some frameworks parse form bodies as JSON anyway, which reopens the hole.

Further reading

Problem with a question

Web Security · Middle · question 27

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