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