Ver Fonte

auto update script executed

Toby Chui há 1 ano atrás
pai
commit
75149733a3
1 ficheiros alterados com 4 adições e 4 exclusões
  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 {
 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
 	return rewrittenURL
 }
 }