From e3b891bc69744ab8d98d1937f5b4d2606caf8c05 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Thu, 7 Nov 2024 15:41:26 +0000 Subject: [PATCH 1/2] Removed nb headers duplication --- nodebalancer/cmd/nodebalancer/server.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nodebalancer/cmd/nodebalancer/server.go b/nodebalancer/cmd/nodebalancer/server.go index e8a0cdc1..cdc53fd2 100644 --- a/nodebalancer/cmd/nodebalancer/server.go +++ b/nodebalancer/cmd/nodebalancer/server.go @@ -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{ From b5bd2e6d0c38159f29222f93abb85ed613a8f163 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Thu, 7 Nov 2024 15:43:55 +0000 Subject: [PATCH 2/2] Updated version --- nodebalancer/cmd/nodebalancer/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodebalancer/cmd/nodebalancer/version.go b/nodebalancer/cmd/nodebalancer/version.go index dd47a51c..c7f6ddf2 100644 --- a/nodebalancer/cmd/nodebalancer/version.go +++ b/nodebalancer/cmd/nodebalancer/version.go @@ -1,3 +1,3 @@ package main -var NB_VERSION = "0.2.5" +var NB_VERSION = "0.2.6"