-
Notifications
You must be signed in to change notification settings - Fork 1
chore: Enable experimental CSP support #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
dbc81a2
1a12dc4
3051ce5
04c7086
4e2f5f8
d67f700
a5bcdd6
9c80517
c5c0b40
61fab05
827bac3
4078c91
0aa07b7
4428519
3c566fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,23 @@ import rehypeSlug from "rehype-slug"; | |
| export default defineConfig({ | ||
| site: "https://sentry.engineering", | ||
| output: "static", | ||
| experimental: { | ||
| csp: { | ||
| scriptDirective: { | ||
| resources: ["'self'", "https://plausible.io"], | ||
| hashes: [ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a note in an MD somewhere that these will change if the scripts are ever modified, but hopefully it's self-evident |
||
| "sha256-t7UDmDY4iklZOU6hhoaa4oMgQfLaBBT9DlTNiRW7xE0=", // Theme init | ||
| "sha256-p7WGvXPfCjOpbo9APNa4AJgj/jO9xZr9aBlEFVcuKUM=", // Plausible init | ||
| "sha256-sVlNBziRgfCssLPd9yhI6q2CTDvIhhkPyoUn5B+G1HI=", // Theme toggle | ||
| "sha256-m+TqEPNJoIsN5pFYeHFt2az1Myng7rZ6Y/9yJIokBrk=", // Post list search | ||
| ], | ||
| }, | ||
| styleDirective: { | ||
| resources: ["'self'", "'unsafe-inline'"], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yarp, have to do it. No real way around it. Style injection will still be possible but the risk is much lower |
||
| }, | ||
| directives: ["connect-src 'self' https://plausible.io"], | ||
| }, | ||
| }, | ||
| integrations: [sitemap()], | ||
| image: { | ||
| service: { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also needs "https://platform.twitter.com" due to reduce-ci-time-with-nx-caching. Or we could just replace it with a screenshot.