This is an automated email from the ASF dual-hosted git repository. shunping pushed a commit to branch revert-36902-website-csp in repository https://gitbox.apache.org/repos/asf/beam.git
commit 1c2f692b7c0b896333c537141bd053f6d4bc372f Author: Shunping Huang <[email protected]> AuthorDate: Thu Nov 27 10:44:02 2025 -0500 Revert "Fix CSP issues (#36902)" This reverts commit c72970d0ee3083c3ec4b78c8f102ec92c61824ea. --- build.gradle.kts | 1 - .../site/assets/css/fontawesome/release-v5.4.1.css | 5 ---- website/www/site/assets/css/roboto/roboto.css | 35 ---------------------- .../site/assets/css/swiper@8/swiper-bundle.min.css | 13 -------- .../www/site/assets/js/jquery/jquery-2.2.4.min.js | 4 --- website/www/site/layouts/partials/head.html | 8 ++--- .../www/site/layouts/partials/head_homepage.html | 8 ++--- website/www/site/static/.htaccess | 5 +--- 8 files changed, 9 insertions(+), 70 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 92a2a27e9bb..bbfd0668211 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -75,7 +75,6 @@ tasks.rat { "**/Gemfile.lock", "**/Rakefile", "**/.htaccess", - "website/www/site/assets/css/**/*", "website/www/site/assets/scss/_bootstrap.scss", "website/www/site/assets/scss/bootstrap/**/*", "website/www/site/assets/js/**/*", diff --git a/website/www/site/assets/css/fontawesome/release-v5.4.1.css b/website/www/site/assets/css/fontawesome/release-v5.4.1.css deleted file mode 100644 index 9e6123ba545..00000000000 --- a/website/www/site/assets/css/fontawesome/release-v5.4.1.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Font Awesome Free 5.4.1 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - */ -.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}. [...] \ No newline at end of file diff --git a/website/www/site/assets/css/roboto/roboto.css b/website/www/site/assets/css/roboto/roboto.css deleted file mode 100644 index a2aa9a1c9f8..00000000000 --- a/website/www/site/assets/css/roboto/roboto.css +++ /dev/null @@ -1,35 +0,0 @@ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 100; - font-stretch: normal; - src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbFmUiA8.ttf) format('truetype'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-stretch: normal; - src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuaabVmUiA8.ttf) format('truetype'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-stretch: normal; - src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbVmUiA8.ttf) format('truetype'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-stretch: normal; - src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWub2bVmUiA8.ttf) format('truetype'); -} -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - font-stretch: normal; - src: url(https://fonts.gstatic.com/s/roboto/v50/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYjalmUiA8.ttf) format('truetype'); -} diff --git a/website/www/site/assets/css/swiper@8/swiper-bundle.min.css b/website/www/site/assets/css/swiper@8/swiper-bundle.min.css deleted file mode 100644 index 16833ecdf64..00000000000 --- a/website/www/site/assets/css/swiper@8/swiper-bundle.min.css +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Swiper 8.4.7 - * Most modern mobile touch slider and framework with hardware accelerated transitions - * https://swiperjs.com - * - * Copyright 2014-2023 Vladimir Kharlampidi - * - * Released under the MIT License - * - * Released on: January 30, 2023 - */ - -@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAA [...] \ No newline at end of file diff --git a/website/www/site/assets/js/jquery/jquery-2.2.4.min.js b/website/www/site/assets/js/jquery/jquery-2.2.4.min.js deleted file mode 100644 index 4024b6622b8..00000000000 --- a/website/www/site/assets/js/jquery/jquery-2.2.4.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r= [...] -}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.inde [...] -void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.par [...] diff --git a/website/www/site/layouts/partials/head.html b/website/www/site/layouts/partials/head.html index 7a2a4bf89df..963a87e113a 100644 --- a/website/www/site/layouts/partials/head.html +++ b/website/www/site/layouts/partials/head.html @@ -17,7 +17,7 @@ <title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title> <meta name="description" content="{{ .Description | default $.Site.Params.description }}"> -<link href="css/roboto/roboto.css" rel="stylesheet"> +<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet"> {{ $scssMain := "scss/main.scss"}} {{ if .Site.IsServer }} @@ -29,7 +29,7 @@ <link href="{{ $css.RelPermalink }}" rel="stylesheet" integrity="{{ $css.Data.integrity }}"> {{ end }} -<script src="js/jquery/jquery-2.2.4.min.js"></script> +<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <style> .body__contained img { max-width: 100% } @@ -69,8 +69,8 @@ <link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="/feed.xml"> <link rel="canonical" href="{{ .Site.Params.hostName }}{{ .Permalink | absURL }}" data-proofer-ignore> <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> -<link rel="stylesheet" href="css/fontawesome/release-v5.4.1.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous"> -<link rel="stylesheet" href="css/swiper@8/swiper-bundle.min.css"/> +<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous"> +<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css"/> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> <!-- Hotjar Tracking Code for https://beam.apache.org/ --> diff --git a/website/www/site/layouts/partials/head_homepage.html b/website/www/site/layouts/partials/head_homepage.html index ecf054f3fc0..069b0b2f1fe 100644 --- a/website/www/site/layouts/partials/head_homepage.html +++ b/website/www/site/layouts/partials/head_homepage.html @@ -17,7 +17,7 @@ <title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title> <meta name="description" content="{{ .Description | default $.Site.Params.description }}"> -<link href="css/roboto/roboto.css" rel="stylesheet"> +<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet"> {{ $scssMain := "scss/main.scss"}} {{ if .Site.IsServer }} @@ -29,7 +29,7 @@ <link href="{{ $css.RelPermalink }}" rel="stylesheet" integrity="{{ $css.Data.integrity }}"> {{ end }} -<script src="js/jquery/jquery-2.2.4.min.js"></script> +<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <style> .body__contained img { max-width: 100% } @@ -60,8 +60,8 @@ <link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="/feed.xml"> <link rel="canonical" href="{{ .Site.Params.hostName }}{{ .Permalink | absURL }}" data-proofer-ignore> <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> -<link rel="stylesheet" href="css/fontawesome/release-v5.4.1.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous"> -<link rel="stylesheet" href="css/swiper@8/swiper-bundle.min.css"/> +<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous"> +<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css"/> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> <!-- Hotjar Tracking Code for https://beam.apache.org/ --> diff --git a/website/www/site/static/.htaccess b/website/www/site/static/.htaccess index 540e3af223e..857b83db3bd 100644 --- a/website/www/site/static/.htaccess +++ b/website/www/site/static/.htaccess @@ -27,7 +27,4 @@ RedirectMatch "/contribute/release-guide" "https://github.com/apache/beam/blob/m RedirectMatch "/contribute/committer-guide" "https://github.com/apache/beam/blob/master/contributor-docs/committer-guide.md" -# Allow embedding content from play.beam.apache.org, youtube.com, drive.google.com, platform.twitter.com, -# static.hotjar.com, cse.google.com, www.google.com/cse, clients1.google.com and fonts.gstatic.com. -# This is the standard way to add local exceptions to the CSP, see https://infra.apache.org/tools/csp.html -SetEnv CSP_PROJECT_DOMAINS "https://play.beam.apache.org/ https://www.youtube.com/ https://drive.google.com/ https://platform.twitter.com/ https://static.hotjar.com/ https://cse.google.com/ http://cse.google.com/ https://www.google.com/cse/ https://fonts.gstatic.com/" +Header set Content-Security-Policy "frame-src 'self' https://play.beam.apache.org/ https://www.youtube.com/ https://drive.google.com/ ;"
