Skip to content

Commit b2960c9

Browse files
authored
fix(website): Use standard method for CSP frame-src exceptions (#36653)
The method for allowing specific domains in iframes has been updated to align with Apache Infra's recommended practices. Instead of directly setting the Content-Security-Policy header, this change uses the `SetEnv CSP_PROJECT_DOMAINS` directive. This is the standard way to add local exceptions, ensuring they are correctly merged with the global CSP managed by Apache Infra. This change maintains the existing permissions for embedding content from Beam Playground, YouTube, and Google Drive.
1 parent b33ab6e commit b2960c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

website/www/site/static/.htaccess

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ RedirectMatch "/contribute/release-guide" "https://github.com/apache/beam/blob/m
2727

2828
RedirectMatch "/contribute/committer-guide" "https://github.com/apache/beam/blob/master/contributor-docs/committer-guide.md"
2929

30-
Header set Content-Security-Policy "frame-src 'self' https://play.beam.apache.org/ https://www.youtube.com/ https://drive.google.com/ ;"
30+
# Allow embedding content from play.beam.apache.org, youtube.com and drive.google.com
31+
# This is the standard way to add local exceptions to the CSP, see https://infra.apache.org/tools/csp.html
32+
SetEnv CSP_PROJECT_DOMAINS "https://play.beam.apache.org/ https://www.youtube.com/ https://drive.google.com/"

0 commit comments

Comments
 (0)