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

Header deprecated: X-Frame-Options #9

Open
mdPlusPlus opened this issue Nov 30, 2024 · 0 comments
Open

Header deprecated: X-Frame-Options #9

mdPlusPlus opened this issue Nov 30, 2024 · 0 comments

Comments

@mdPlusPlus
Copy link

According to MDN the use of this header is deprecated: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Apparently it's supposed to be replaced by the frame-ancestors CSP: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors

I'm no expert, but it seems like to implement what was X-Frame-Options DENY is now this in CSP:

  • Apache: Header always set Content-Security-Policy "frame-ancestors 'none';"
  • NGINX: add_header Content-Security-Policy "frame-ancestors 'none';";
  • Lighttpd: "Content-Security-Policy" => "frame-ancestors 'self' https://myhomeassistant.mydomain.tld;"

Disclaimer: All of this is untested

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

1 participant