fix: use SetEnv CSP_PROJECT_DOMAINS instead of overriding CSP header#815
Merged
Jtrust merged 2 commits intoapache:masterfrom Mar 21, 2026
Merged
fix: use SetEnv CSP_PROJECT_DOMAINS instead of overriding CSP header#815Jtrust merged 2 commits intoapache:masterfrom
Jtrust merged 2 commits intoapache:masterfrom
Conversation
Follow Apache Infra standard CSP handling per https://infra.apache.org/tools/csp.html The Content-Security-Policy header must not be overridden directly. Instead, use SetEnv CSP_PROJECT_DOMAINS to add project-specific domains to the default Apache CSP base policy.
✅ Deploy Preview for skywalking-website-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
Please resolve the conflicts. |
Member
|
LGTM. |
Member
After this PR was merged, a resource loading error occurred, rendering the kapa.ai plugin unusable. We plan to revert the changes. @wu-sheng
|
Jtrust
added a commit
to Jtrust/skywalking-website
that referenced
this pull request
Mar 21, 2026
Jtrust
added a commit
that referenced
this pull request
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Fixes apache/skywalking#13554
Why
The
.htaccessfile was directly setting theContent-Security-Policyheader viaHeader set Content-Security-Policy, which overrides the Apache infrastructure default CSP.Per Apache Infra's standard CSP handling, projects must use
SetEnv CSP_PROJECT_DOMAINSto add project-specific domains to the default CSP base policy, rather than replacing the header entirely.How
Header set Content-Security-Policy "frame-src 'self' https://www.google.com https://app.netlify.com"SetEnv CSP_PROJECT_DOMAINS "https://www.google.com https://app.netlify.com"This allows Apache Infra's default CSP to remain intact while adding the necessary domains for Netlify and Google (used for site functionality).
Testing
.htaccesssyntax