1
0
Эх сурвалжийг харах

auto update script executed

Toby Chui 1 жил өмнө
parent
commit
77bfba3fd9

+ 3 - 1
mod/dynamicproxy/dpcore/utils.go

@@ -26,7 +26,9 @@ func replaceLocationHost(urlString string, rrr *ResponseRewriteRuleSet, useTLS b
 	//E.g. Proxy config: blog.example.com -> example.com/blog
 	//Check if it is actually redirecting to example.com instead of a new domain
 	//like news.example.com.
-	if rrr.ProxyDomain != u.Host {
+	// The later check bypass apache screw up method of redirection header
+	// e.g. https://imuslab.com -> http://imuslab.com:443
+	if rrr.ProxyDomain != u.Host && !strings.Contains(u.Host, rrr.OriginalHost+":") {
 		fmt.Println(rrr.ProxyDomain, u.Host, rrr.OriginalHost)
 		//New location domain not matching proxy target domain.
 		//Do not modify location header