From 803b4b7fc3465619e9f4f137d86d208ede1aca78 Mon Sep 17 00:00:00 2001 From: Pratik Borole Date: Wed, 8 May 2024 13:37:07 +0530 Subject: [PATCH] chore: add staging and prod URLs to origins --- .env.example | 2 ++ app/__init__.py | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 369e111..67aea3d 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,4 @@ SECRET_TOKEN=my-secret-token FRONTEND_DEV_URL=https://dev.slicktelemetry.com +FRONTEND_STAGING_URL=https://staging.slicktelemetry.com +FRONTEND_PROD_URL=https://slicktelemetry.com diff --git a/app/__init__.py b/app/__init__.py index 1eb356a..e6c7550 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -16,7 +16,13 @@ # Ergast configuration ergast = Ergast(result_type="raw", auto_cast=True) # Cors Middleware -origins = ["http://localhost:3000", "http://127.0.0.1:3000", config["FRONTEND_DEV_URL"]] +origins = [ + "http://localhost:3000", + "http://127.0.0.1:3000", + config["FRONTEND_DEV_URL"], + config["FRONTEND_STAGING_URL"], + config["FRONTEND_PROD_URL"], +] # Others favicon_path = "favicon.ico" # Security