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
No related branches found
No related tags found
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):
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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment