Merge v2.10 into v3.0

This commit is contained in:
mmatur 2023-10-11 16:20:26 +02:00
commit 286181aa61
No known key found for this signature in database
GPG key ID: 2FFE42FC256CFF8E
62 changed files with 712 additions and 189 deletions

View file

@ -125,6 +125,7 @@ func (fa *forwardAuth) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
rw.WriteHeader(http.StatusInternalServerError)
return
}
defer forwardResponse.Body.Close()
body, readError := io.ReadAll(forwardResponse.Body)
if readError != nil {
@ -135,7 +136,6 @@ func (fa *forwardAuth) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
rw.WriteHeader(http.StatusInternalServerError)
return
}
defer forwardResponse.Body.Close()
// Pass the forward response's body and selected headers if it
// didn't return a response within the range of [200, 300).