From b168c37c569a4cfacdc1e7b26b83520a5bad2d0c Mon Sep 17 00:00:00 2001 From: Rodja Trappe Date: Sat, 11 Jan 2025 06:02:04 +0100 Subject: [PATCH] Revert "register middlewares in ui.run_with" This reverts commit 20c4f6eb90aa374eacd4cfde6daf53d3ef87d8d6. --- nicegui/ui_run_with.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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)