Skip to content

Commit

Permalink
settings/dev: update csp to include BO js on older browsers and updag…
Browse files Browse the repository at this point in the history
…rade requests to be secure fixes #844
  • Loading branch information
philli-m committed Oct 26, 2023
1 parent 5a607a4 commit e495303
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion digitalstrategie/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@
# CSP for development (not very strict)
CSP_DEFAULT_SRC = ["'self'"]
# unsafe-eval only for testing
CSP_SCRIPT_SRC = ["'unsafe-eval'"]
CSP_SCRIPT_SRC = [
"'unsafe-eval'",
"'self'",
"https://stats.liqd.net",
"https://berlin.de",
"https://www.berlin.de",
]
CSP_SCRIPT_SRC_ATTR = ["'none'"]
# wagtail (and webpack during dev) requires unsafe-inline
CSP_SCRIPT_SRC_ELEM = [
Expand Down Expand Up @@ -93,3 +99,4 @@
CSP_WORKER_SRC = ["'none'"]
CSP_EXCLUDE_URL_PREFIXES = "/admin"
CSP_REPORT_ONLY = False
CSP_UPGRADE_INSECURE_REQUESTS = True

0 comments on commit e495303

Please sign in to comment.