Skip to content

Commit

Permalink
fix: Styles not loading because of faulty CSP setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Sep 29, 2023
1 parent 7eab59a commit d2ac611
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
"style-src": ["'self'", "'unsafe-inline'"],
"script-src": ["'self'", "'strict-dynamic'"],
},
"content_security_policy_nonce_in": ["script-src", "style-src"],
"content_security_policy_nonce_in": ["script-src"],
"force_https": False,
}
# React requires `eval` to work correctly in dev mode
Expand All @@ -1444,10 +1444,14 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
"https://events.mapbox.com",
],
"object-src": "'none'",
"style-src": ["'self'", "'unsafe-inline'"],
"style-src": [
"'self'",
"'unsafe-inline'",
"https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css",
],
"script-src": ["'self'", "'unsafe-inline'", "'unsafe-eval'"],
},
"content_security_policy_nonce_in": ["script-src", "style-src"],
"content_security_policy_nonce_in": ["script-src"],
"force_https": False,
}

Expand Down

0 comments on commit d2ac611

Please sign in to comment.