diff --git a/backend/main.py b/backend/main.py index 22adbe0..6221e0b 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1,6 +1,21 @@ from fastapi import FastAPI from api.route import router +from fastapi.middleware.cors import CORSMiddleware app = FastAPI() app.include_router(router) + +origins = [ + "https://baseddata.io", + "https://api.baseddata.io", +] + +# Add the CORS middleware to the app +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +)