Skip to content

Commit

Permalink
reverting transport changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mativm02 committed Jul 7, 2023
1 parent 1d86a23 commit 10c54c7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gateway/reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,10 @@ func (p *ReverseProxy) httpTransport(timeOut float64, rw http.ResponseWriter, re
},
AllowHTTP: true,
}
return &TykRoundTripper{transport, h2t, p.logger, p.Gw, p.TykAPISpec}
return &TykRoundTripper{transport, h2t, p.logger, p.Gw}
}

return &TykRoundTripper{transport, nil, p.logger, p.Gw, p.TykAPISpec}
return &TykRoundTripper{transport, nil, p.logger, p.Gw}
}

func (p *ReverseProxy) setCommonNameVerifyPeerCertificate(tlsConfig *tls.Config, hostName string) {
Expand Down Expand Up @@ -793,7 +793,6 @@ type TykRoundTripper struct {
h2ctransport *http2.Transport
logger *logrus.Entry
Gw *Gateway `json:"-"`
apiDef *APISpec `json:"-"`
}

func (rt *TykRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
Expand All @@ -816,7 +815,7 @@ func (rt *TykRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
return handleInMemoryLoop(handler, r)
}

if rt.Gw.GetConfig().OpenTelemetry.Enabled && rt.apiDef.DetailedTracing {
if rt.Gw.GetConfig().OpenTelemetry.Enabled {
var baseRoundTripper http.RoundTripper = rt.transport
if rt.h2ctransport != nil {
baseRoundTripper = rt.h2ctransport
Expand Down

0 comments on commit 10c54c7

Please sign in to comment.