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

Remove frame-ancestors CSP to allow embedding via iframe #5170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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