from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api.api import api_router from app.core.config import settings app = FastAPI( title=settings.APP_NAME, version=settings.APP_VERSION, debug=settings.DEBUG, ) # Configure CORS app.add_middleware( CORSMiddleware, allow_origins=["*"], # Allows all origins allow_credentials=True, allow_methods=["*"], # Allows all methods allow_headers=["*"], # Allows all headers ) # Include API router app.include_router(api_router) @app.get("/health", tags=["Health"]) async def health_check() -> dict[str, str]: """Health check endpoint.""" return {"status": "ok"}