generated from Luis/nextjs-python-web-template
added middleware for emulation #76
@@ -6,12 +6,12 @@ from datetime import datetime
|
|||||||
|
|
||||||
# Importing FastAPI and related components
|
# Importing FastAPI and related components
|
||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
from fastapi.responses import HTMLResponse, JSONResponse
|
from fastapi.responses import HTMLResponse, JSONResponse
|
||||||
|
|
||||||
# Importing configuration and schemas from the clan_cli package
|
# Importing configuration and schemas from the clan_cli package
|
||||||
import clan_cli.config as config
|
import clan_cli.config as config
|
||||||
from clan_cli.webui.schemas import Resolution
|
from clan_cli.webui.schemas import Resolution
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
|
||||||
|
|
||||||
# Creating FastAPI instances for different applications
|
# Creating FastAPI instances for different applications
|
||||||
app_dlg = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
|
app_dlg = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
|
||||||
@@ -35,6 +35,7 @@ for app, port in apps:
|
|||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Healthcheck endpoints for different applications
|
# Healthcheck endpoints for different applications
|
||||||
@app_c1.get("/")
|
@app_c1.get("/")
|
||||||
async def root_c1() -> str:
|
async def root_c1() -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user