Pick the fix
Which header stops your login page from being framed by another site?
Hint 1 of 1
Which directive is about who embeds you?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Content-Security-Policy: frame-ancestors 'self'
Correct. Only your own origin may frame it.
Clickjacking puts your page in an invisible frame on another site. The frame-ancestors directive tells the browser which origins may embed the page, and 'self' allows only yours.
Why not the others?
- B
X-Content-Type-Options: nosniff. Stops MIME sniffing, not framing. - C
Referrer-Policy: no-referrer. Controls the Referer header. - D
Access-Control-Allow-Origin: *. That's CORS, and it loosens things.