logging_util: Remove dependence on get_current_request.

Pass the HttpRequest explicitly through the two webhooks that log to
the webhook loggers.

get_current_request is now unused, so remove it (in the same commit
for test coverage reasons).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 63be67af80)
This commit is contained in:
Anders Kaseorg
2023-07-10 16:17:30 -04:00
committed by Alex Vandiver
parent cc21dc8ec7
commit 406f9f7852
9 changed files with 85 additions and 95 deletions

View File

@@ -162,7 +162,6 @@ ALLOWED_HOSTS += REALM_HOSTS.values()
MIDDLEWARE = [
"zerver.middleware.TagRequests",
"zerver.middleware.SetRemoteAddrFromRealIpHeader",
"zerver.middleware.RequestContext",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
# Important: All middleware before LogRequests should be