mirror of
https://github.com/golang/net.git
synced 2026-03-31 10:27:08 +09:00
http/httpproxy: document all loopbacks are special cased not just localhost
Fixes golang/go#33695
Change-Id: I2f7598da7c6fda161ba357a75bba72de2fee8226
GitHub-Last-Rev: 443dbb13b1
GitHub-Pull-Request: golang/net#116
Reviewed-on: https://go-review.googlesource.com/c/net/+/356510
Reviewed-by: Damien Neil <dneil@google.com>
Trust: Damien Neil <dneil@google.com>
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
This commit is contained in:
committed by
Damien Neil
parent
4f30a5c013
commit
c6ed85c7a1
@@ -113,8 +113,8 @@ func getEnvAny(names ...string) string {
|
||||
// environment, or a proxy should not be used for the given request, as
|
||||
// defined by NO_PROXY.
|
||||
//
|
||||
// As a special case, if req.URL.Host is "localhost" (with or without a
|
||||
// port number), then a nil URL and nil error will be returned.
|
||||
// As a special case, if req.URL.Host is "localhost" or a loopback address
|
||||
// (with or without a port number), then a nil URL and nil error will be returned.
|
||||
func (cfg *Config) ProxyFunc() func(reqURL *url.URL) (*url.URL, error) {
|
||||
// Preprocess the Config settings for more efficient evaluation.
|
||||
cfg1 := &config{
|
||||
|
||||
Reference in New Issue
Block a user