Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
from routes.route import router | |
from fastapi.middleware.cors import CORSMiddleware | |
app = FastAPI() | |
app.add_middleware( | |
CORSMiddleware, | |
allow_origins=["*"], # Allow requests from any origin | |
allow_credentials=True, | |
allow_methods=["GET", "POST", "PUT", "DELETE"], | |
allow_headers=["Authorization", "Content-Type"], | |
) | |
app.include_router(router) |