tuned some http settings, refactor

This commit is contained in:
yusing
2024-10-04 07:13:52 +08:00
parent dd629f516b
commit 245f073350
3 changed files with 12 additions and 11 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/sirupsen/logrus"
"github.com/yusing/go-proxy/internal/api/v1/error_page"
"github.com/yusing/go-proxy/internal/common"
"github.com/yusing/go-proxy/internal/docker/idlewatcher"
E "github.com/yusing/go-proxy/internal/error"
. "github.com/yusing/go-proxy/internal/net/http"
@@ -68,9 +67,9 @@ func NewHTTPRoute(entry *P.ReverseProxyEntry) (*HTTPRoute, E.NestedError) {
var unregIdleWatcher func()
if entry.NoTLSVerify {
trans = common.DefaultTransportNoTLS.Clone()
trans = DefaultTransportNoTLS.Clone()
} else {
trans = common.DefaultTransport.Clone()
trans = DefaultTransport.Clone()
}
rp := NewReverseProxy(entry.URL, trans)