Skip to content

Commit

Permalink
HACK: store all response headers
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Oct 24, 2024
1 parent 26df186 commit 762f3eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package filters
import (
"bufio"
"context"
"encoding/json"
"errors"
"fmt"
"net"
Expand Down Expand Up @@ -254,6 +255,10 @@ func (a *auditResponseWriter) Header() http.Header {
a.event.Annotations["openshift.io/response-header-content-length"] = strings.Join(value, ",")
}
}
headers, err := json.Marshal(a.ResponseWriter.Header())
if err == nil {
a.event.Annotations["openshift.io/response-headers"] = string(headers)
}
return a.ResponseWriter.Header()
}

Expand Down

0 comments on commit 762f3eb

Please sign in to comment.