From 45b9e3901e49839eac605d5608146142943e3612 Mon Sep 17 00:00:00 2001 From: Shahan Neda Date: Sun, 1 Sep 2024 23:48:03 -0700 Subject: [PATCH] Setup new be domain and sentry --- backend/app/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app/__init__.py b/backend/app/__init__.py index 81211e38..e652f4fc 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -48,6 +48,7 @@ def create_app(config_name): print("Environment is", config_name) + frontend_url = get_fe_url() if config_name != "testing" and config_name != "development": sentry_sdk.init( dsn="https://85a9bf2fc71b287cc4e60cb9f918f034@o4507682847850496.ingest.us.sentry.io/4507801405227008", @@ -59,7 +60,9 @@ def create_app(config_name): # We recommend adjusting this value in production. profiles_sample_rate=1.0, # Config name is either development or testing or production - environment=config_name, + environment="staging" + if frontend_url.find("staging") != -1 + else "production", send_default_pii=True, ) dictConfig( @@ -116,6 +119,7 @@ def create_app(config_name): "https://feeding-canadian-kids-prod.firebaseapp.com", "https://feeding-canadian-kids-prod.web.app", "https://mealpairingplatform.feedingcanadiankids.org", + "https://api.mealpairingplatform.feedingcanadiankids.org", get_fe_url(), ] app.config["CORS_SUPPORTS_CREDENTIALS"] = True