Commit 2faabec 1 parent 24d954f commit 2faabec Copy full SHA for 2faabec
File tree 3 files changed +9
-0
lines changed
3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
12
12
SENTRY_ENVIRONMENT = os .environ .get ("SENTRY_ENVIRONMENT" , "local" )
13
+ SENTRY_CSP_REPORT_URI = None
13
14
14
15
15
16
def git_available ():
@@ -82,5 +83,9 @@ def configure():
82
83
send_default_pii = False ,
83
84
event_scrubber = EventScrubber (denylist = get_denylist ()),
84
85
)
86
+
87
+ # override the module-level variable when configuration happens, if set
88
+ global SENTRY_CSP_REPORT_URI
89
+ SENTRY_CSP_REPORT_URI = os .environ .get ("SENTRY_REPORT_URI" , "" )
85
90
else :
86
91
print ("SENTRY_DSN not set, so won't send events" )
Original file line number Diff line number Diff line change @@ -300,6 +300,9 @@ def _filter_empty(ls):
300
300
301
301
CSP_OBJECT_SRC = ["'none'" ]
302
302
303
+ if sentry .SENTRY_CSP_REPORT_URI :
304
+ CSP_REPORT_URI = [sentry .SENTRY_CSP_REPORT_URI ]
305
+
303
306
CSP_SCRIPT_SRC = [
304
307
"https://cdn.amplitude.com/libs/" ,
305
308
"https://cdn.jsdelivr.net/" ,
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ resource "azurerm_linux_web_app" "main" {
78
78
# Sentry
79
79
" SENTRY_DSN" = " ${ local . secret_prefix } sentry-dsn)" ,
80
80
" SENTRY_ENVIRONMENT" = local.env_name,
81
+ " SENTRY_REPORT_URI" = " ${ local . secret_prefix } sentry-report-uri)" ,
81
82
82
83
# Environment variables for data migration
83
84
" MST_SENIOR_GROUP_ID" = " ${ local . secret_prefix } mst-senior-group-id)" ,
You can’t perform that action at this time.
0 commit comments