mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
Enhance CommitSessionMiddleware to allow health probes to bypass session management, ensuring faster and more reliable responses. (#24384)
This commit is contained in:
@@ -88,6 +88,13 @@ class CommitSessionMiddleware:
|
||||
await self.app(scope, receive, send)
|
||||
return
|
||||
|
||||
path = scope.get('path', '')
|
||||
# Keep health probes independent from sync session commit/remove
|
||||
# so DB pressure cannot delay or fail probe responses.
|
||||
if path in {'/health', '/ready', '/health/db'}:
|
||||
await self.app(scope, receive, send)
|
||||
return
|
||||
|
||||
try:
|
||||
await self.app(scope, receive, send)
|
||||
except BaseException:
|
||||
|
||||
Reference in New Issue
Block a user