File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -956,7 +956,7 @@ def init_sentry(before_send: Callable | None = None):
956
956
# NOTE: make sure values are a tuple or list, and to quote special values like 'self'
957
957
958
958
# ideally we'd use BASE_URI but it'd have to be lazy or cause issues
959
- CSP_DEFAULT_SRC = ["'self'" , "'unsafe-inline'" ] + config (
959
+ CSP_DEFAULT_SRC = ["'self'" ] + config (
960
960
"CSP_EXTRA_DEFAULT_SRC" ,
961
961
default = [],
962
962
split = True ,
@@ -1021,8 +1021,11 @@ def init_sentry(before_send: Callable | None = None):
1021
1021
1022
1022
# we must include this explicitly, otherwise the style-src only includes the nonce because
1023
1023
# of CSP_INCLUDE_NONCE_IN
1024
- CSP_STYLE_SRC = CSP_DEFAULT_SRC + ["fonts.googleapis.com" ] # used by DRF spectacular
1025
- CSP_SCRIPT_SRC = CSP_DEFAULT_SRC
1024
+ CSP_STYLE_SRC = CSP_DEFAULT_SRC + [
1025
+ "'unsafe-inline'" ,
1026
+ "fonts.googleapis.com" ,
1027
+ ] # used by DRF spectacular
1028
+ CSP_SCRIPT_SRC = CSP_DEFAULT_SRC + ["'unsafe-inline'" ]
1026
1029
CSP_FONT_SRC = ("'self'" , "fonts.gstatic.com" )
1027
1030
CSP_WORKER_SRC = ("'self'" , "blob:" )
1028
1031
You can’t perform that action at this time.
0 commit comments