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=["*"], )