added middleware for emulation #76

Merged
Ghost merged 2 commits from georgdeamon into main 2024-01-28 18:37:23 +00:00
Showing only changes of commit dc04001dca - Show all commits

View File

@@ -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: