Explorar o código

Update httpsify.go

Mohammed Al Ashaal %!s(int64=8) %!d(string=hai) anos
pai
achega
c615e52a17
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      httpsify.go

+ 3 - 1
httpsify.go

@@ -78,7 +78,9 @@ func main() {
 		req.Header.Set("X-Forwarded-Proto", "https")
 		req.Header.Set("X-Forwarded-Host", r.Host)
 		req.Header.Set("X-Forwarded-Port", *port)
-		req.URL = r.URL
+		req.URL.Path = r.URL.Path
+		req.URL.RawQuery = r.URL.RawQuery
+		req.Fragment = r.Fragment
 		res, err := http.DefaultClient.Do(req)
 		if err != nil {
 			http.Error(w, http.StatusText(504), 504)