Skip to content
Snippets Groups Projects
Unverified Commit 2f9fd5ab authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Don't log OPTIONS request at INFO (#8049)

parent 4e874ed5
Branches
Tags
No related merge requests found
Log `OPTIONS` requests at `DEBUG` rather than `INFO` level to reduce amount logged at `INFO`.
...@@ -319,7 +319,13 @@ class SynapseRequest(Request): ...@@ -319,7 +319,13 @@ class SynapseRequest(Request):
def _should_log_request(self) -> bool: def _should_log_request(self) -> bool:
"""Whether we should log at INFO that we processed the request. """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): class XForwardedForRequest(SynapseRequest):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment