mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 17:59:24 -04:00
fix(internal): silence unsolicited response log lines
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
7c80c23e90
commit
0c97bd7c4a
@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- The contact email in the LibreJS header has been changed.
|
||||
- The hard dependency on WebCrypto has been removed, allowing a proof of work challenge to work over plain (unencrypted) HTTP.
|
||||
- The legacy JSON based policy file example has been removed and all documentation for how to write a policy file in JSON has been deleted. JSON based policy files will still work, but YAML is the superior option for Anubis configuration.
|
||||
- A standard library HTTP server log message about HTTP pipelining not working has been filtered out of Anubis' logs. There is no action that can be taken about it.
|
||||
|
||||
### Breaking changes
|
||||
|
||||
|
@ -50,6 +50,9 @@ func (elf *ErrorLogFilter) Write(p []byte) (n int, err error) {
|
||||
if strings.Contains(logMessage, "context canceled") {
|
||||
return len(p), nil // Suppress the log by doing nothing
|
||||
}
|
||||
if strings.Contains(logMessage, "Unsolicited response received on idle HTTP channel") {
|
||||
return len(p), nil
|
||||
}
|
||||
if elf.Unwrap != nil {
|
||||
return elf.Unwrap.Writer().Write(p)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user