12 lines
288 B
Python
12 lines
288 B
Python
from fastapi.middleware.cors import CORSMiddleware
|
|
from fastapi import FastAPI
|
|
|
|
def add_middlewares(app: FastAPI):
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["*"],
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|