from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.routes import router from constants import ORIGINS app = FastAPI() app.include_router(router) app.add_middleware( CORSMiddleware, allow_origins=ORIGINS, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], )