Spaces:
Sleeping
Sleeping
File size: 389 Bytes
f1495be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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) |