Limit frame-ancestors to sites you trust on Apache
Why it matters
frame-ancestors with * or a bare scheme lets any website frame your pages, which is exactly what clickjacking needs. List only your own origin and the partners that really embed you.
Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.
The fix
- Stage 1: add a Header always set Content-Security-Policy-Report-Only line with the narrowed frame-ancestors and a reporting endpoint (as in the generic snippet) and reload.
- Stage 2: replace the wildcard in the enforced Content-Security-Policy and remove the report-only line.
Related
Scan your domain to see whether this applies to you.