mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-30 03:31:27 +02:00
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:
co-authored by
Jan Larwig
parent
a4d89036ec
commit
44236f0314
+1
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user