Skip to content

Commit

Permalink
Add CSP_REPORT_URI (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
edlouth authored Dec 11, 2023
1 parent acdedb9 commit 6cb67ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions grai-server/app/the_guide/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,13 @@ def inner(value: str | bool) -> bool:
SECURE_HSTS_SECONDS = config("SECURE_HSTS_SECONDS", default=0, cast=int)

# Content Security Policy
CSP_IMG_SRC = "'self' data: http://www.w3.org/2000/svg https://cdn.redoc.ly"
CSP_IMG_SRC = "'self' data: https://cdn.redoc.ly"
CSP_STYLE_SRC = "'self' 'unsafe-inline' https://unpkg.com https://fonts.googleapis.com"
CSP_SCRIPT_SRC = "'self' 'unsafe-inline' blob: https://unpkg.com https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js"
CSP_FONT_SRC = "'self' https://fonts.gstatic.com"
CSP_FONT_SRC = "'self' data: https://fonts.gstatic.com"
CSP_OBJECT_SRC = "'none'"
CSP_REPORT_ONLY = config("CSP_REPORT_ONLY", default=False, cast=bool)
CSP_REPORT_URI = config("CSP_REPORT_URI", default=None)

PERMISSIONS_POLICY = {
"accelerometer": [],
Expand Down

0 comments on commit 6cb67ff

Please sign in to comment.