Skip to content
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

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

rusackas
Copy link
Member

SUMMARY

The site is not displaying things properly... and it might be because of the htaccess file OR the meta CSP tag... both are present. This removes the CSP meta tag, and adds more holes in the htaccess 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

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@rusackas rusackas requested a review from craig-rueda February 27, 2024 20:07
@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Feb 27, 2024
@rusackas rusackas changed the title fix(docs): remving meta tag CSP, poking more holes in htaccess fix(docs): removing meta tag CSP, poking more holes in htaccess Feb 27, 2024
@@ -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/';"}],
Copy link
Member Author

@rusackas rusackas Feb 27, 2024

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 *; \
Copy link
Member Author

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'; \
Copy link
Member Author

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.

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; \
Copy link
Member Author

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.

@rusackas rusackas merged commit 058d6ff into master Feb 27, 2024
22 checks passed
@rusackas rusackas deleted the more-csp-mess branch February 27, 2024 20:23
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.1.0 labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels doc Namespace | Anything related to documentation size/S 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants