Skip to content

Commit 45b9e39

Browse files
committed
Setup new be domain and sentry
1 parent c8a044f commit 45b9e39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/app/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
def create_app(config_name):
5050
print("Environment is", config_name)
51+
frontend_url = get_fe_url()
5152
if config_name != "testing" and config_name != "development":
5253
sentry_sdk.init(
5354
dsn="https://85a9bf2fc71b287cc4e60cb9f918f034@o4507682847850496.ingest.us.sentry.io/4507801405227008",
@@ -59,7 +60,9 @@ def create_app(config_name):
5960
# We recommend adjusting this value in production.
6061
profiles_sample_rate=1.0,
6162
# Config name is either development or testing or production
62-
environment=config_name,
63+
environment="staging"
64+
if frontend_url.find("staging") != -1
65+
else "production",
6366
send_default_pii=True,
6467
)
6568
dictConfig(
@@ -116,6 +119,7 @@ def create_app(config_name):
116119
"https://feeding-canadian-kids-prod.firebaseapp.com",
117120
"https://feeding-canadian-kids-prod.web.app",
118121
"https://mealpairingplatform.feedingcanadiankids.org",
122+
"https://api.mealpairingplatform.feedingcanadiankids.org",
119123
get_fe_url(),
120124
]
121125
app.config["CORS_SUPPORTS_CREDENTIALS"] = True

0 commit comments

Comments
 (0)