Clickjacking

Difficulty: Intermediate

Question

How to prevent Clickjacking?

Answer

Use the `X-Frame-Options: DENY` header or `Content-Security-Policy: frame-ancestors` to prevent your site from being nested in an iframe.

Concepts covered

Clickjacking, UI Redressing, Iframe, X-Frame-Options