This commit is contained in:
Hossein 2025-08-07 01:17:32 +03:30
parent dd9e639e6d
commit 62743cdb62

View File

@ -19,7 +19,7 @@ app = FastAPI(
app.add_middleware(
CORSMiddleware,
allow_origins=eval(os.getenv("ALLOWED_ORIGINS", '["*"]')),
allow_credentials=eval(os.getenv("ALLOWED_CREDENTIALS", "True")),
allow_credentials=os.getenv("ALLOWED_CREDENTIALS", "true").lower() == "true",
allow_methods=eval(os.getenv("ALLOWED_METHODS", '["*"]')),
allow_headers=eval(os.getenv("ALLOWED_HEADERS", '["*"]')),
)