-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix(docs): removing meta tag CSP, poking more holes in htaccess #27274
Conversation
@@ -261,7 +261,6 @@ const config = { | |||
theme: lightCodeTheme, | |||
darkTheme: darkCodeTheme, | |||
}, | |||
metadata: [{name: 'Content-Security-Policy', content: "default-src 'self'; frame-src 'https://calendar.google.com/' 'https://preset.io/' 'https://sidebar.bugherd.com/';"}], |
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.
the quotes on URLs are part of the problem, I suspect... but we need more holes poked for other stuff as well since we're apparently overriding some apache server default.
|
||
Header set Content-Security-Policy "default-src 'self'; \ | ||
script-src 'self'; \ | ||
img-src 'self' https://static.scarf.sh *; \ |
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.
the wildcard here isn't ideal. When the bulk of the site looks OK, we can tighten the screws here.
Header set Content-Security-Policy "default-src 'self'; img-src *;" | ||
|
||
Header set Content-Security-Policy "default-src 'self'; \ | ||
script-src 'self'; \ |
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.
Trying to avoid 'unsafe-inline' wherever possible, but we may well have to resort to it here or elsewhere.
docs/static/.htaccess
Outdated
script-src-elem 'self' https://www.googletagmanager.com https://www.google-analytics.com; \ | ||
style-src-elem 'self' https://fonts.googleapis.com; \ | ||
font-src 'self' https://fonts.gstatic.com; \ | ||
frame-src 'self' https://calendar.google.com https://preset.io https://sidebar.bugherd.com 'https://unpkg.com; \ |
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.
I don't think 'self' is needed here, but no harm no foul.
SUMMARY
The site is not displaying things properly... and it might be because of the
htaccess
file OR themeta
CSP tag... both are present. This removes the CSP meta tag, and adds more holes in thehtaccess
file. Let's see if it works! Sadly, more PRs to come, I would guess.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION