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 {