|
@@ -64,6 +64,7 @@ type ReverseProxy struct {
|
|
type ResponseRewriteRuleSet struct {
|
|
type ResponseRewriteRuleSet struct {
|
|
ProxyDomain string
|
|
ProxyDomain string
|
|
OriginalHost string
|
|
OriginalHost string
|
|
|
|
+ UseTLS bool
|
|
}
|
|
}
|
|
|
|
|
|
type requestCanceler interface {
|
|
type requestCanceler interface {
|
|
@@ -353,7 +354,7 @@ func (p *ReverseProxy) ProxyHTTP(rw http.ResponseWriter, req *http.Request, rrr
|
|
//Full path
|
|
//Full path
|
|
//Replace the forwarded target with expected Host
|
|
//Replace the forwarded target with expected Host
|
|
fmt.Println(rrr.ProxyDomain, domainWithoutPort, rrr.OriginalHost)
|
|
fmt.Println(rrr.ProxyDomain, domainWithoutPort, rrr.OriginalHost)
|
|
- lr, err := replaceLocationHost(locationRewrite, rrr.OriginalHost)
|
|
|
|
|
|
+ lr, err := replaceLocationHost(locationRewrite, rrr.OriginalHost, rrr.UseTLS)
|
|
if err == nil {
|
|
if err == nil {
|
|
locationRewrite = lr
|
|
locationRewrite = lr
|
|
}
|
|
}
|