15 lines
321 B
Python
15 lines
321 B
Python
from fastapi import FastAPI
|
|
from starlette.middleware.cors import CORSMiddleware
|
|
|
|
|
|
def start_app():
|
|
app = FastAPI()
|
|
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=['*'],
|
|
allow_credentials=True,
|
|
allow_methods=['GET', 'POST', 'PUT', 'DELETE'],
|
|
allow_headers=['*'],
|
|
)
|