Skip to content

Commit

Permalink
Fix fonts CSP for staging (#14466)
Browse files Browse the repository at this point in the history
* Fix font-src for stage hosts

* Simplify font CSP to defaults

---------

Co-authored-by: Jan Brasna <[email protected]>
  • Loading branch information
2 people authored and stephaniehobson committed Apr 17, 2024
1 parent 58ba46c commit 4361d5c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions bedrock/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,7 @@
_csp_connect_extra_for_dev = [
"com-getpocket-prod1.mini.snplow.net",
]
_csp_font_src = [
"'self'",
"assets.getpocket.com",
]
_csp_font_src = []

else:
# Mozorg mode
Expand Down Expand Up @@ -217,9 +214,7 @@
"cjms.services.mozilla.com",
]
_csp_connect_extra_for_dev = []
_csp_font_src = [
"'self'",
]
_csp_font_src = []

sys.stdout.write(f"Using SITE_MODE of '{site_mode}'\n")

Expand Down Expand Up @@ -248,6 +243,7 @@

CSP_SCRIPT_SRC = CSP_DEFAULT_SRC + _csp_script_src
CSP_STYLE_SRC = CSP_DEFAULT_SRC + _csp_style_src
CSP_FONT_SRC = CSP_DEFAULT_SRC + _csp_font_src
CSP_CHILD_SRC = CSP_DEFAULT_SRC + _csp_child_src
CSP_CONNECT_SRC = CSP_DEFAULT_SRC + _csp_connect_src

Expand All @@ -264,7 +260,6 @@

# support older browsers (mainly Safari)
CSP_FRAME_SRC = CSP_CHILD_SRC
CSP_FONT_SRC = _csp_font_src

# 4. SETTINGS WHICH APPLY REGARDLESS OF SITE MODE
if DEV:
Expand Down

0 comments on commit 4361d5c

Please sign in to comment.