mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Don't log OPTIONS request at INFO (#8049)
This commit is contained in:
parent
4e874ed593
commit
2f9fd5ab00
1
changelog.d/8049.misc
Normal file
1
changelog.d/8049.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
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:
|
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user