Mohammed Al Ashaal пре 9 година
родитељ
комит
7220fe48f6
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      httpsify.go

+ 1 - 1
httpsify.go

@@ -58,7 +58,7 @@ func main() {
 	}
 	log.Fatal(http.Serve(listener, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		defer r.Body.Close()
-		req, err := http.NewRequest(r.Method, *backend, r.Body)
+		req, err := http.NewRequest(r.Method, *backend + r.URL.Path, r.Body)
 		if err != nil {
 			http.Error(w, http.StatusText(504), 504)
 			return