Skip to content

Commit

Permalink
chore: improve CSP add base uri restriction (#26251)
Browse files Browse the repository at this point in the history
(cherry picked from commit 578a899)
  • Loading branch information
dpgaspar authored and michael-s-molina committed Dec 15, 2023
1 parent c99c630 commit c878e2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
# If you want Talisman, how do you want it configured??
TALISMAN_CONFIG = {
"content_security_policy": {
"base-uri": ["'self'"],
"default-src": ["'self'"],
"img-src": ["'self'", "blob:", "data:"],
"worker-src": ["'self'", "blob:"],
Expand All @@ -1431,6 +1432,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
# React requires `eval` to work correctly in dev mode
TALISMAN_DEV_CONFIG = {
"content_security_policy": {
"base-uri": ["'self'"],
"default-src": ["'self'"],
"img-src": ["'self'", "blob:", "data:"],
"worker-src": ["'self'", "blob:"],
Expand Down

0 comments on commit c878e2e

Please sign in to comment.