Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Override original response headers
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
  • Loading branch information
torchiaf committed Jul 3, 2023
1 parent 510c73d commit 422a9d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jetstream/passthrough.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,9 @@ func (p *portalProxy) ProxySingleRequest(c echo.Context) error {

// Copy headers from original response
for header := range res.ResponseHeader {
c.Response().Header().Set(header, res.ResponseHeader.Get(header))
if c.Response().Header().Get(header) == "" {
c.Response().Header().Set(header, res.ResponseHeader.Get(header))
}
}

// FIXME: cnsiRequest.Status info is lost for failures, only get a status code
Expand Down

0 comments on commit 422a9d0

Please sign in to comment.