Browse Source

auto update script executed

Toby Chui 2 năm trước cách đây
mục cha
commit
75149733a3
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  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
 }