diff --git a/controller/thymis_controller/main.py b/controller/thymis_controller/main.py index 0b942b40..e536b40d 100644 --- a/controller/thymis_controller/main.py +++ b/controller/thymis_controller/main.py @@ -14,6 +14,7 @@ from alembic.script import ScriptDirectory from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware +from fastapi.middleware.gzip import GZipMiddleware from sqlalchemy import engine_from_config from thymis_controller.config import global_settings from thymis_controller.database.base import Base @@ -191,6 +192,8 @@ async def lifespan(app: FastAPI): allow_headers=["*"], ) +app.add_middleware(GZipMiddleware, minimum_size=1000, compresslevel=5) + app.include_router(auth.router, prefix="/auth") app.include_router(api.router, prefix="/api") app.include_router(agent.router, prefix="/agent")