|
@@ -1,6 +1,7 @@
|
|
package dpcore
|
|
package dpcore
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "fmt"
|
|
"net/url"
|
|
"net/url"
|
|
"strings"
|
|
"strings"
|
|
)
|
|
)
|
|
@@ -26,6 +27,7 @@ func replaceLocationHost(urlString string, rrr *ResponseRewriteRuleSet, useTLS b
|
|
//Check if it is actually redirecting to example.com instead of a new domain
|
|
//Check if it is actually redirecting to example.com instead of a new domain
|
|
//like news.example.com.
|
|
//like news.example.com.
|
|
if rrr.ProxyDomain != u.Host {
|
|
if rrr.ProxyDomain != u.Host {
|
|
|
|
+ fmt.Println(rrr.ProxyDomain, u.Host)
|
|
//New location domain not matching proxy target domain.
|
|
//New location domain not matching proxy target domain.
|
|
//Do not modify location header
|
|
//Do not modify location header
|
|
return urlString, nil
|
|
return urlString, nil
|