Remove default User-Agent handling in NewHeaderPruningReverseProxy
#15738
Labels
area/networking
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/question
Further information is requested
triage/accepted
Issues which should be fixed (post-triage)
Milestone
/area networking
/kind cleanup
Ask your question here:
in
NewHeaderPruningReverseProxy
, we are checking whether the User-Agent is unset. If yes, we explicitly set it to""
so that it's not set to the default Go HTTP client User-Agent:serving/pkg/http/proxy.go
Lines 50 to 54 in e41df09
but i think this is no longer necessary starting from golang/go@f001df5 (>= go1.20rc1), where this check was moved from
httputil.NewSingleHostReverseProxy
(where the Knative code was copied from, as noted from the comment) toReverseProxy.ServeHTTP
, so all instances ofReverseProxy
will now have this behaviour.so should we remove this conditional block?
The text was updated successfully, but these errors were encountered: