diff --git a/proxy/proxy.go b/proxy/proxy.go index b5e5f22..822ef6d 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -24,6 +24,7 @@ import ( "net/http" "net/url" "reflect" + "strings" "time" "github.com/golang/glog" @@ -127,6 +128,9 @@ func (p *Proxy) allowed(u *url.URL) bool { if u.Host == host { return true } + if strings.HasPrefix(host, "*.") && strings.HasSuffix(u.Host, host[2:]) { + return true + } } return false