🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Security and JWT: all 10 questions

Quiz: Security and JWT · Question 3 of 10

Why is CSRF protection disabled in this API?

Why is CSRF protection disabled in this API?

  1. A.CSRF only affects GET requests
  2. B.The API uses Bearer tokens in a header, not cookies, so browsers don't attach credentials automatically
  3. C.Spring Boot 4 removed CSRF protection
  4. D.JWTs are encrypted
Answer & explanation

Correct answer: The API uses Bearer tokens in a header, not cookies, so browsers don't attach credentials automatically

CSRF exploits cookies the browser sends on its own.

Can you get the rest right without peeking?

Take the timed Quiz: Security and JWT quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →