Compare commits

...

1 Commits

Author SHA1 Message Date
Evan Rusackas
4f9468e95a chore(docs): use SetEnv CSP_PROJECT_DOMAINS format for ASF compliance
Updates .htaccess to use the ASF-required format for CSP overrides:
- Use SetEnv CSP_PROJECT_DOMAINS instead of Header set Content-Security-Policy
- Document each required domain with its purpose
- Reference ASF CSP documentation

Required domains:
- widget.kapa.ai: AI chatbot widget
- *.googleapis.com, *.google.com, *.gstatic.com: Google Calendar, reCAPTCHA
- *.github.com, *.githubusercontent.com: GitHub images in docs
- *.algolia.net, *.algolianet.com: Algolia DocSearch

Fixes: https://github.com/apache/superset/issues/35845

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:53:37 -08:00
2 changed files with 8 additions and 12 deletions

View File

@@ -238,16 +238,5 @@ Understanding the Superset Points of View
- [Superset API](https://superset.apache.org/docs/rest-api)
## Repo Activity
<a href="https://next.ossinsight.io/widgets/official/compose-last-28-days-stats?repo_id=39464018" target="_blank" align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-last-28-days-stats/thumbnail.png?repo_id=39464018&image_size=auto&color_scheme=dark" width="655" height="auto" />
<img alt="Performance Stats of apache/superset - Last 28 days" src="https://next.ossinsight.io/widgets/official/compose-last-28-days-stats/thumbnail.png?repo_id=39464018&image_size=auto&color_scheme=light" width="655" height="auto" />
</picture>
</a>
<!-- Made with [OSS Insight](https://ossinsight.io/) -->
<!-- telemetry/analytics pixel: -->
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=bc1c90cd-bc04-4e11-8c7b-289fb2839492" />

View File

@@ -22,7 +22,14 @@ RewriteRule ^(.*)$ https://superset.apache.org/$1 [R,L]
RewriteCond %{HTTP_HOST} ^superset.incubator.apache.org$ [NC]
RewriteRule ^(.*)$ https://superset.apache.org/$1 [R=301,L]
Header set Content-Security-Policy "default-src data: blob: 'self' *.apache.org widget.kapa.ai *.githubusercontent.com *.scarf.sh *.googleapis.com *.google.com *.run.app *.gstatic.com *.github.com *.algolia.net *.algolianet.com 'unsafe-inline' 'unsafe-eval'; frame-src *; frame-ancestors 'self' *.google.com https://sidebar.bugherd.com; form-action 'self'; worker-src blob:; img-src 'self' blob: data: https:; font-src 'self'; object-src 'none'"
# CSP permissions for superset.apache.org
# Additional domains required for docs site functionality:
# - widget.kapa.ai: AI chatbot widget (uses Google reCAPTCHA)
# - *.googleapis.com, *.google.com, *.gstatic.com: Google Calendar embed, kapa.ai reCAPTCHA
# - *.github.com, *.githubusercontent.com: GitHub user-attachment images in docs
# - *.algolia.net, *.algolianet.com: Algolia DocSearch
# See: https://infra.apache.org/tools/csp.html
SetEnv CSP_PROJECT_DOMAINS "widget.kapa.ai https://*.googleapis.com/ https://*.google.com/ https://*.gstatic.com/ https://*.github.com/ https://*.githubusercontent.com/ https://*.algolia.net/ https://*.algolianet.com/"
# REDIRECTS