INNER CODE UNIT · Python
get_application
cording12/next-fast-turbo · apps/api/src/main.py:28
def get_application():
_app = FastAPI(
title=settings.PROJECT_NAME,
description=settings.PROJECT_DESCRIPTION,
generate_unique_id_function=custom_generate_unique_id,
root_path=settings.ROOT,
root_path_in_servers=True,
)
_app.include_router(api_router, prefix=settings.API_VERSION)
_app.include_router(info_router, tags=[""])
_app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],