From 2f9fd5ab00fa915fd76e5ebcfbbe458b17d0168e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 7 Aug 2020 14:53:05 +0100 Subject: Don't log OPTIONS request at INFO (#8049) --- synapse/http/site.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'synapse/http') diff --git a/synapse/http/site.py b/synapse/http/site.py index 79a9229a26..6e79b47828 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py @@ -319,7 +319,13 @@ class SynapseRequest(Request): def _should_log_request(self) -> bool: """Whether we should log at INFO that we processed the request. """ - return self.path != b"/health" + if self.path == b"/health": + return False + + if self.method == b"OPTIONS": + return False + + return True class XForwardedForRequest(SynapseRequest): -- cgit 1.5.1