From 029a766013df34fb4c4f25680e96c9071c80001b Mon Sep 17 00:00:00 2001 From: Eric Iles Date: Fri, 8 Jun 2018 16:43:00 -0400 Subject: [PATCH] Fix issue in EOSIO/eos#3947 --- filter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/filter.go b/filter.go index 3f08d46..5d832f1 100644 --- a/filter.go +++ b/filter.go @@ -288,10 +288,6 @@ func chainMiddleware(mw ...middleware) middleware { func copyHeaders(response http.Header, request http.Header) { for key, value := range request { - // Let our server set the Content-Length - if key == "Content-Length" { - continue - } for _, header := range value { response.Add(key, header) } @@ -314,6 +310,10 @@ func forwardCallToNodeos(w http.ResponseWriter, r *http.Request) { return } + // Forward headers to nodeos + request.Header = make(http.Header) + copyHeaders(request.Header, r.Header) + res, err := client.Do(request) if err != nil {