diff --git a/iwm_browser/main.py b/iwm_browser/main.py index 00878ba..8208ed2 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -1,5 +1,6 @@ from typing import Union from fastapi.staticfiles import StaticFiles +from fastapi.middleware.gzip import GZipMiddleware from fastapi.responses import HTMLResponse, PlainTextResponse from fastapi import FastAPI, Form, Response import jinja2 @@ -15,6 +16,7 @@ from . import __version__ basedir = os.path.dirname(__file__) app = FastAPI(openapi_url=None) +app.add_middleware(GZipMiddleware) app.mount("/static", StaticFiles(directory=basedir + "/static"), name="static") template_env = jinja2.Environment(