15 lines
330 B
Python
15 lines
330 B
Python
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from app.routes import router
|
|
from constants import ORIGINS
|
|
|
|
app = FastAPI()
|
|
app.include_router(router)
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=ORIGINS,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|