Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report Iframe nesting level instead of using frame-ancestors directive #537

Open
moonyowl opened this issue Oct 28, 2018 · 1 comment
Open

Comments

@moonyowl
Copy link

moonyowl commented Oct 28, 2018

To prevent webpage loading in iframes, we have to use X-Frame-Options header or frame-ancestors CSP directive. It's very inefficient way because it works as "rule for browser". Instead of that, it will be more efficient to report iframe nesting level to server and handle this situation at server.

TL;DR: we should send such requests

Origin: example.com
Frame-Level: 1

instead of such responses

Content-Security-Policy: frame-ancestors 'self'
X-Frame-Options: sameorigin
@annevk
Copy link
Member

annevk commented Oct 29, 2018

https://github.com/mikewest/sec-metadata does this ("nested-document"). I'm not convinced it's worth adding a header just for frame-nesting level though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants