diff --git a/app/main.py b/app/main.py index b8cd536..c91c747 100644 --- a/app/main.py +++ b/app/main.py @@ -12,6 +12,7 @@ from app.routes.logging import router as logging_router from dotenv import load_dotenv from mangum import Mangum +from fastapi.middleware.cors import CORSMiddleware load_dotenv() @@ -21,6 +22,16 @@ app = FastAPI() +origins = ["*"] +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], + expose_headers=["*"], +) + @app.on_event("startup") def startup_db_client():