This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 50de8dd209e [fix](website) Allow YouTube embeds in CSP (#4645)
50de8dd209e is described below

commit 50de8dd209e90022f153b7557469d548e8cf37eb
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Sun Nov 15 12:59:55 2026 +0800

    [fix](website) Allow YouTube embeds in CSP (#4645)
    
    Clicking Play on the [Doris Summit 2026
    recap](https://doris.apache.org/blog/doris-summit-2026-recap/) creates a
    YouTube iframe, but the production CSP blocks its origin and Chrome
    displays a gray error frame.
    
    Add `https://www.youtube-nocookie.com` to `frame-src` in
    `static/.htaccess` so the existing privacy-enhanced player can load.
    
    ## Validation
    
    - Reproduced the production `frame-src` violation in Chrome.
    - Browser checks using the original and updated CSP confirmed that the
    original policy blocks the YouTube iframe, the updated policy allows it,
    and unrelated frame origins remain blocked.
    - Opened the real blog in Chrome with only its response CSP replaced by
    the updated policy. The real YouTube embed returned HTTP 200 without a
    YouTube `frame-src` violation.
    - Confirmed every other CSP directive and all other `.htaccess` content
    remain unchanged.
    - `git diff --check` passed. No site build was run for this
    HTTP-header-only change.
    
    ## Self-review
    
    - Goal: remove the confirmed CSP blocker for the existing player; the
    browser checks verify this behavior.
    - Scope: one permitted iframe origin added in one file.
    - Information architecture and links: no page, URL, anchor, navigation,
    version, or locale content changes are needed.
    - Frontend conventions: retain the existing CSP format and all current
    sources; the component, theme, desktop/mobile layout, and hydration
    behavior are unchanged.
    - Verification: the browser checks cover the changed policy and confirm
    unrelated frames remain blocked; continuous video playback was not
    asserted.
    - Other findings: no additional correctness, usability, accessibility,
    SEO, or maintainability issues found in this change.
    
    ## Versions
    
    Not applicable: shared HTTP-header configuration, with no versioned
    documentation changes.
    
    - [ ] dev
    - [ ] 4.x
    - [ ] 3.x
    - [ ] 2.1 or older (not covered by version/language sync gate)
    
    ## Languages
    
    Not applicable: the shared header applies across site locales; no text
    changes.
    
    - [ ] Chinese
    - [ ] English
    
    ## Docs Checklist
    
    - [x] Checked by AI
    - [ ] Test Cases Built
    - [x] Updated required version and language counterparts, or explained
    why not
    - [x] If only one language changed, confirmed whether source/translation
    counterparts need sync
    
    Validation used temporary browser checks; no permanent test files were
    added.
    
    Co-authored-by: morningman <[email protected]>
---
 static/.htaccess | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/static/.htaccess b/static/.htaccess
index 06d4949483a..768101d5b34 100644
--- a/static/.htaccess
+++ b/static/.htaccess
@@ -1,5 +1,5 @@
 <IfModule mod_headers.c>
-    Header set Content-Security-Policy "script-src 'self' 
https://cdnd.selectdb.com https://analytics.apache.org widget.kapa.ai 
www.google.com https://hcaptcha.com https://*.hcaptcha.com 
https://www.gstatic.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' 
https://cdnd.selectdb.com https://analytics.apache.org proxy.kapa.ai 
kapa-widget-proxy-la7dkmplpq-uc.a.run.app metrics.kapa.ai https://hcaptcha.com 
https://*.hcaptcha.com www.google.com https://agent.velodb.io; frame-src 'self' 
www [...]
+    Header set Content-Security-Policy "script-src 'self' 
https://cdnd.selectdb.com https://analytics.apache.org widget.kapa.ai 
www.google.com https://hcaptcha.com https://*.hcaptcha.com 
https://www.gstatic.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' 
https://cdnd.selectdb.com https://analytics.apache.org proxy.kapa.ai 
kapa-widget-proxy-la7dkmplpq-uc.a.run.app metrics.kapa.ai https://hcaptcha.com 
https://*.hcaptcha.com www.google.com https://agent.velodb.io; frame-src 'self' 
www [...]
 </IfModule>
 
 # Native and optimized redirect manifests retain only known historical aliases.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to