Skip to content

Commit

Permalink
chore: move Google font from CSP style-src
Browse files Browse the repository at this point in the history
directive to font-src directive since Roboto font tag changed from
a text/css type to a font type
  • Loading branch information
lalver1 committed Jan 23, 2025
1 parent 26800a0 commit 9ae7973
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion benefits/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,18 @@ def RUNTIME_ENVIRONMENT():
CSP_STYLE_SRC = [
"'self'",
"'unsafe-inline'",
"https://fonts.googleapis.com/css",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/",
]
env_style_src = _filter_empty(os.environ.get("DJANGO_CSP_STYLE_SRC", "").split(","))
CSP_STYLE_SRC.extend(env_style_src)

CSP_FONT_SRC = [
"'self'",
"https://fonts.googleapis.com/css",
]
env_font_src = _filter_empty(os.environ.get("DJANGO_CSP_FONT_SRC", "").split(","))
CSP_FONT_SRC.extend(env_font_src)

# Configuration for requests
# https://requests.readthedocs.io/en/latest/user/advanced/#timeouts

Expand Down

0 comments on commit 9ae7973

Please sign in to comment.