This commit is contained in:
Soumyadas15 2025-05-25 15:22:28 +05:30
commit 9d7a1164d4
2 changed files with 7 additions and 6 deletions

View File

@ -105,15 +105,12 @@ async def log_requests_middleware(request: Request, call_next):
raise
# Define allowed origins based on environment
allowed_origins = ["https://www.suna.so", "https://suna.so", "https://staging.suna.so", "http://localhost:3000"]
allowed_origins = ["https://www.suna.so", "https://suna.so", "http://localhost:3000"]
# Add staging-specific origins
if config.ENV_MODE == EnvMode.STAGING:
allowed_origins.append("http://localhost:3000")
# Add local-specific origins
if config.ENV_MODE == EnvMode.LOCAL:
allowed_origins.append("http://localhost:3000")
allowed_origins.append("https://suna-*-prjcts.vercel.app")
allowed_origins.append("https://staging.suna.so")
app.add_middleware(
CORSMiddleware,

4
mise.toml Normal file
View File

@ -0,0 +1,4 @@
# https://mise.jdx.dev/
[tools]
node = "20"
python = "3.11.10"