diff --git a/nicegui/ui_run_with.py b/nicegui/ui_run_with.py index 29d519a2a..a7a4e8640 100644 --- a/nicegui/ui_run_with.py +++ b/nicegui/ui_run_with.py @@ -3,12 +3,10 @@ from typing import Literal, Optional, Union from fastapi import FastAPI -from fastapi.middleware.gzip import GZipMiddleware from . import core, storage from .air import Air from .language import Language -from .middlewares import RedirectWithPrefixMiddleware from .nicegui import _shutdown, _startup @@ -61,9 +59,8 @@ def run_with( prod_js=prod_js, show_welcome_message=show_welcome_message, ) + storage.set_storage_secret(storage_secret) - core.app.add_middleware(GZipMiddleware) - core.app.add_middleware(RedirectWithPrefixMiddleware) if on_air: core.air = Air('' if on_air is True else on_air)