Skip to content

Commit

Permalink
♻️[#68] move unsafe-inline source
Browse files Browse the repository at this point in the history
  • Loading branch information
Coperh committed Sep 20, 2024
1 parent 157bc99 commit 9fef862
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions open_api_framework/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ def init_sentry(before_send: Callable | None = None):
# NOTE: make sure values are a tuple or list, and to quote special values like 'self'

# ideally we'd use BASE_URI but it'd have to be lazy or cause issues
CSP_DEFAULT_SRC = ["'self'", "'unsafe-inline'"] + config(
CSP_DEFAULT_SRC = ["'self'"] + config(
"CSP_EXTRA_DEFAULT_SRC",
default=[],
split=True,
Expand Down Expand Up @@ -1021,8 +1021,8 @@ def init_sentry(before_send: Callable | None = None):

# we must include this explicitly, otherwise the style-src only includes the nonce because
# of CSP_INCLUDE_NONCE_IN
CSP_STYLE_SRC = CSP_DEFAULT_SRC + ["fonts.googleapis.com"] # used by DRF spectacular
CSP_SCRIPT_SRC = CSP_DEFAULT_SRC
CSP_STYLE_SRC = CSP_DEFAULT_SRC + ["'unsafe-inline'", "fonts.googleapis.com"] # used by DRF spectacular
CSP_SCRIPT_SRC = CSP_DEFAULT_SRC + ["'unsafe-inline'"]
CSP_FONT_SRC = ("'self'", "fonts.gstatic.com")
CSP_WORKER_SRC = ("'self'", "blob:")

Expand Down

0 comments on commit 9fef862

Please sign in to comment.