Skip to content

Commit c6ed85c

Browse files
AlexanderYastrebovneild
authored andcommitted
http/httpproxy: document all loopbacks are special cased not just localhost
Fixes golang/go#33695 Change-Id: I2f7598da7c6fda161ba357a75bba72de2fee8226 GitHub-Last-Rev: 443dbb1 GitHub-Pull-Request: #116 Reviewed-on: https://go-review.googlesource.com/c/net/+/356510 Reviewed-by: Damien Neil <[email protected]> Trust: Damien Neil <[email protected]> Trust: Cherry Mui <[email protected]> Run-TryBot: Damien Neil <[email protected]>
1 parent 4f30a5c commit c6ed85c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http/httpproxy/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ func getEnvAny(names ...string) string {
113113
// environment, or a proxy should not be used for the given request, as
114114
// defined by NO_PROXY.
115115
//
116-
// As a special case, if req.URL.Host is "localhost" (with or without a
117-
// port number), then a nil URL and nil error will be returned.
116+
// As a special case, if req.URL.Host is "localhost" or a loopback address
117+
// (with or without a port number), then a nil URL and nil error will be returned.
118118
func (cfg *Config) ProxyFunc() func(reqURL *url.URL) (*url.URL, error) {
119119
// Preprocess the Config settings for more efficient evaluation.
120120
cfg1 := &config{

0 commit comments

Comments
 (0)