Skip to content

Commit

Permalink
Remove frame-ancestors CSP to allow embedding via iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
nisargjhaveri committed Nov 19, 2024
1 parent 8764e83 commit 6ba2029
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions res/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
# Protection for versions that do not support CSP yet.
X-XSS-Protection: 1; mode=block

# Do not allow being embedded in a frame.
X-Frame-Options: SAMEORIGIN

# Do not give the referrer for external navigations.
Referrer-Policy: same-origin

Expand All @@ -25,7 +22,7 @@
# 7. `frame-ancestors` is the same purpose as `X-Frame-Options` above.
# 8. `form-action`prevents forms, we don't need this.`
# 9. `frame-src` allows the embedding of YouTube videos in the docs.
Content-Security-Policy: default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src http: https: data:; object-src 'none'; connect-src *; frame-ancestors 'self'; form-action 'none'; frame-src www.youtube-nocookie.com
Content-Security-Policy: default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src http: https: data:; object-src 'none'; connect-src *; form-action 'none'; frame-src www.youtube-nocookie.com

# Set the correct MIME type for WebAssembly modules.
/*.wasm
Expand Down
2 changes: 0 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const serverConfig = {
// /!\ Don't forget to keep it sync-ed with the headers here /!\
'X-Content-Type-Options': 'nosniff',
'X-XSS-Protection': '1; mode=block',
'X-Frame-Options': 'SAMEORIGIN',
'Referrer-Policy': 'same-origin',
'Content-Security-Policy': oneLine`
default-src 'self';
Expand All @@ -59,7 +58,6 @@ const serverConfig = {
img-src http: https: data:;
object-src 'none';
connect-src *;
frame-ancestors 'self';
form-action 'none'
`,
},
Expand Down

0 comments on commit 6ba2029

Please sign in to comment.