Sfoglia il codice sorgente

Update httpsify.go

Mohammed Al Ashaal 8 anni fa
parent
commit
1e1e953586
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      httpsify.go

+ 2 - 2
httpsify.go

@@ -58,12 +58,12 @@ func main() {
 	}
 	log.Fatal(http.Serve(listener, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		defer r.Body.Close()
-		tr := &http.Transport{
+		client := &http.Client{
 			CheckRedirect: func(req *http.Request, via []*http.Request) error {
 				return http.ErrUseLastResponse
 		    	},
 		}
-		client := &http.Client{Transport: tr}
+		//client := &http.Client{Transport: tr}
 		req, err := http.NewRequest(r.Method, *backend + r.URL.RequestURI(), r.Body)
 		if err != nil {
 			http.Error(w, http.StatusText(504), 504)