Skip to content

Commit 93a0faf

Browse files
authored
Merge pull request #1136 from moonstream-to/fix-nb-header-duplications
Removed nb headers duplication
2 parents 6268a83 + b5bd2e6 commit 93a0faf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

nodebalancer/cmd/nodebalancer/server.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,15 @@ func Server() {
214214
// Change r.Host from nodebalancer's to end host so TLS check will be passed
215215
r.Host = r.URL.Host
216216
}
217+
218+
proxyToEndpoint.ModifyResponse = func(w *http.Response) error {
219+
// Remove proxy headers
220+
for k := range w.Header {
221+
w.Header.Del(k)
222+
}
223+
return nil
224+
}
225+
217226
proxyErrorHandler(proxyToEndpoint, endpoint)
218227

219228
blockchainPool.AddNode(&Node{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package main
22

3-
var NB_VERSION = "0.2.5"
3+
var NB_VERSION = "0.2.6"

0 commit comments

Comments
 (0)