Skip to content

Commit d6d78f6

Browse files
Prevent nesting site in iFrame (#2148)
Sets frame-ancestors property to none to prevent nesting this site in an iframe. Although we already set X-Frame-Options to deny, this is the modern CSP method for declaring this setting. Fixes #1080.
1 parent e4d31ee commit d6d78f6

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

config/_default/server.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Content-Security-Policy = """
6565
https://d4twhgtvn0ff5.cloudfront.net/
6666
https://letsencrypt-merch.myshopify.com
6767
;
68+
frame-ancestors 'none';
6869
"""
6970

7071
[[headers]]

netlify.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Content-Security-Policy = """
8383
https://www.paypal.com
8484
https://www.google-analytics.com
8585
;
86+
frame-ancestors 'none';
8687
"""
8788

8889
[[headers]]

0 commit comments

Comments
 (0)