drop code clearing out the user agent (#15857)

This is now handled properly in the go standard library
f001df540b
This commit is contained in:
Dave Protasowski 2025-04-22 07:42:39 -04:00 committed by GitHub
parent 128550cd41
commit e74fe1a497
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 6 deletions

View File

@ -47,12 +47,6 @@ func NewHeaderPruningReverseProxy(target, hostOverride string, headersToRemove [
req.Header.Add(netheader.PassthroughLoadbalancingKey, "true")
}
// Copied from httputil.NewSingleHostReverseProxy.
if _, ok := req.Header[netheader.UserAgentKey]; !ok {
// explicitly disable User-Agent so it's not set to default value
req.Header.Set(netheader.UserAgentKey, "")
}
for _, h := range headersToRemove {
req.Header.Del(h)
}