mirror of
https://github.com/getsentry/self-hosted.git
synced 2025-12-08 19:46:14 +00:00
Add settings for enabling CSP to config file (#2134)
* add enabling csp to config file * comment out report URI to avoid breaking self-hosted
This commit is contained in:
parent
d8b1432863
commit
25f10ea897
@ -306,3 +306,16 @@ OPENAI_API_KEY = env("OPENAI_API_KEY", "")
|
||||
|
||||
if OPENAI_API_KEY:
|
||||
SENTRY_FEATURES["organizations:open-ai-suggestion"] = True
|
||||
|
||||
##############################################
|
||||
# Content Security Policy settings
|
||||
##############################################
|
||||
|
||||
if "csp.middleware.CSPMiddleware" not in MIDDLEWARE:
|
||||
MIDDLEWARE = ("csp.middleware.CSPMiddleware",) + MIDDLEWARE
|
||||
# CSP_REPORT_URI = "https://{your-sentry-installation}/api/{csp-project}/security/?sentry_key={sentry-key}"
|
||||
CSP_REPORT_ONLY = True
|
||||
|
||||
# optional extra permissions
|
||||
# https://django-csp.readthedocs.io/en/latest/configuration.html
|
||||
# CSP_SCRIPT_SRC += ["example.com"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user