Explorar o código

auto update script executed

Toby Chui %!s(int64=2) %!d(string=hai) anos
pai
achega
75149733a3
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      mod/dynamicproxy/proxyRequestHandler.go

+ 4 - 4
mod/dynamicproxy/proxyRequestHandler.go

@@ -45,10 +45,10 @@ func (router *Router) getSubdomainProxyEndpointFromHostname(hostname string) *Su
 }
 
 func (router *Router) rewriteURL(rooturl string, requestURL string) string {
-	rewrittenURL := ""
-	rewrittenURL = strings.TrimPrefix(requestURL, rooturl)
-	rewrittenURL = strings.TrimPrefix(requestURL, "http://"+rooturl)
-	rewrittenURL = strings.TrimPrefix(requestURL, "https://"+rooturl)
+	rewrittenURL := requestURL
+	rewrittenURL = strings.TrimPrefix(rewrittenURL, rooturl)
+	rewrittenURL = strings.TrimPrefix(rewrittenURL, "http://"+rooturl)
+	rewrittenURL = strings.TrimPrefix(rewrittenURL, "https://"+rooturl)
 
 	return rewrittenURL
 }