File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ func httpProxyBlockedPaths(url string) bool {
101101func httpProxy (w http.ResponseWriter , r * http.Request ){
102102 method := r .Method
103103 url := r .URL .String ()
104- if (method == "GET" && ! httpProxyBlockedPaths (url )){
104+ if (( method == "GET" || method == "HEAD" ) && ! httpProxyBlockedPaths (url )){
105105 proxy .ServeHTTP (w , r )
106106 }else {
107107 log .Printf ("blocked: %s %s" , method , url )
@@ -125,7 +125,7 @@ func main(){
125125 }
126126 os .Exit (0 )
127127 }else {
128- log .Println ("starting ..." )
128+ log .Println ("starting socket-proxy v" + os . Getenv ( "APP_VERSION" ) )
129129 // setup signal handler
130130 signals ()
131131
@@ -139,7 +139,8 @@ func main(){
139139 proxy = httputil .NewSingleHostReverseProxy (localhost )
140140 proxy .Transport = & http.Transport {
141141 DialContext : func (_ context.Context , _ , _ string )(net.Conn , error ){
142- return dockerSocket , nil
142+ dockerSocket , err = docketSockerDialer .Dial ("unix" , os .Getenv ("SOCKET_PROXY_DOCKER_SOCKET" ))
143+ return dockerSocket , err
143144 },
144145 }
145146
You can’t perform that action at this time.
0 commit comments