fix: do not log error for backend logout 204 (#3381)
* Don't log error for backend logout 204 Signed-off-by: artificiosus <artificiosus@users.noreply.github.com> * doc: add changelog entry for #3381 Signed-off-by: Jan Larwig <jan@larwig.com> * refactor: use http.StatusOK and http.StatusNoContent instead of integers Signed-off-by: Jan Larwig <jan@larwig.com> --------- Signed-off-by: artificiosus <artificiosus@users.noreply.github.com> Signed-off-by: Jan Larwig <jan@larwig.com> Co-authored-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
parent
a4d89036ec
commit
44236f0314
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
- [#3382](https://github.com/oauth2-proxy/oauth2-proxy/pull/3382) chore(deps): update gomod and golangci/golangci-lint to v2.11.4 (@tuunit)
|
||||
- [#3374](https://github.com/oauth2-proxy/oauth2-proxy/pull/3374) fix: handle Unix socket RemoteAddr in IP resolution (@H1net)
|
||||
- [#3381](https://github.com/oauth2-proxy/oauth2-proxy/pull/3381) fix: do not log error for backend logout 204 (@artificiosus)
|
||||
|
||||
|
||||
## Release Highlights
|
||||
|
|
|
|||
|
|
@ -798,7 +798,7 @@ func (p *OAuthProxy) backendLogout(rw http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != 200 {
|
||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusNoContent {
|
||||
logger.Errorf("error while calling backend logout url, returned error code %v", resp.StatusCode)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue