Log spoofing details only once. (#710)

This commit is contained in:
Jean-Rémy Bancel 2019-09-23 13:40:14 -07:00 committed by Knative Prow Robot
parent f31c478cbc
commit 0b1a8b3530
1 changed files with 1 additions and 1 deletions

View File

@ -112,6 +112,7 @@ func New(
}
// Spoof the hostname at the resolver level
logf("Spoofing %s -> %s", domain, endpoint)
transport := &http.Transport{
DialContext: func(ctx context.Context, network, addr string) (conn net.Conn, e error) {
spoofed := addr
@ -119,7 +120,6 @@ func New(
// The original hostname:port is spoofed by replacing the hostname by the value
// returned by ResolveEndpoint.
spoofed = endpoint + ":" + addr[i+1:]
logf("Spoofing %s -> %s", addr, spoofed)
}
return dialContext(ctx, network, spoofed)
},