Skip to content

[rest] Fix content-security-policy violation on RestCatalog API yaml#5355

Merged
JingsongLi merged 3 commits intoapache:masterfrom
liyubin117:redoc-local-yaml
Mar 27, 2025
Merged

[rest] Fix content-security-policy violation on RestCatalog API yaml#5355
JingsongLi merged 3 commits intoapache:masterfrom
liyubin117:redoc-local-yaml

Conversation

@liyubin117
Copy link
Copy Markdown
Contributor

@liyubin117 liyubin117 commented Mar 27, 2025

Purpose

Apache webserver specifies a CSP in the HTTP header, making the CSP defined in the <meta> tag invalid. Therefore, we should not access rest-catalog-open-api.yaml via an external link.
image

Tests

API and Format

Documentation

@liyubin117 liyubin117 force-pushed the redoc-local-yaml branch 3 times, most recently from 1547d0f to 4b56c89 Compare March 27, 2025 05:41
@liyubin117
Copy link
Copy Markdown
Contributor Author

@JingsongLi I have used csp in my local environment to test the feature and work fine, PTAL, thanks!

 <meta
          http-equiv="Content-Security-Policy"
          content="default-src 'self' data: blob: 'unsafe-inline' https://www.apachecon.com/ https://www.communityovercode.org/ https://analytics.apache.org/; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://*.apache.org/ https://apache.org/; style-src 'self' 'unsafe-inline' data: https://*.apache.org/ https://apache.org/; frame-ancestors 'self'; frame-src 'self' data: blob:; img-src 'self' data: https://*.apache.org/ https://apache.org/ https://www.apachecon.com/; worker-src 'self' data: blob:;">

@JingsongLi
Copy link
Copy Markdown
Contributor

Looks good to me!

@JingsongLi JingsongLi merged commit b38d025 into apache:master Mar 27, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants