mirror of https://github.com/kortix-ai/suna.git
fix(api): update allowed origins for CORS configuration in staging environment
This commit is contained in:
parent
2835ac50a6
commit
39cd63ee67
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue