From 56e2b93aa003ec933770944a1b436fa82026ebf8 Mon Sep 17 00:00:00 2001 From: yym68686 Date: Sat, 14 Dec 2024 16:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Bug:=20Try=20to=20fix=20vercel?= =?UTF-8?q?=20500=20error.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index c8519f6..fdb8646 100644 --- a/main.py +++ b/main.py @@ -551,7 +551,7 @@ async def dispatch(self, request: Request, call_next): try: response = await call_next(request) - if request.url.path.startswith("/v1"): + if request.url.path.startswith("/v1") and not DISABLE_DATABASE: if isinstance(response, (FastAPIStreamingResponse, StarletteStreamingResponse)) or type(response).__name__ == '_StreamingResponse': response = LoggingStreamingResponse( content=response.body_iterator,