Skip to content

Commit

Permalink
🐛 Bug: Try to fix vercel 500 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Dec 14, 2024
1 parent 910c44a commit 56e2b93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 56e2b93

Please sign in to comment.