Skip to content

Commit

Permalink
Removed nb headers duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
kompotkot committed Nov 7, 2024
1 parent 5dad0a3 commit e3b891b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nodebalancer/cmd/nodebalancer/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ func Server() {
// Change r.Host from nodebalancer's to end host so TLS check will be passed
r.Host = r.URL.Host
}

proxyToEndpoint.ModifyResponse = func(w *http.Response) error {
// Remove proxy headers
for k := range w.Header {
w.Header.Del(k)
}
return nil
}

proxyErrorHandler(proxyToEndpoint, endpoint)

blockchainPool.AddNode(&Node{
Expand Down

0 comments on commit e3b891b

Please sign in to comment.