1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-28 07:17:06 +00:00

add a tls.Config parameter for reverse proxy

This commit is contained in:
tuhao
2021-03-12 13:20:21 +08:00
parent 84581e5314
commit 71f1d86420
2 changed files with 23 additions and 10 deletions

View File

@@ -2,6 +2,7 @@
package host_test
import (
"crypto/tls"
"net"
"net/url"
"testing"
@@ -24,7 +25,11 @@ func TestProxy(t *testing.T) {
t.Fatalf("%v while parsing url", err)
}
proxy := host.NewProxy("", u)
config := &tls.Config{
InsecureSkipVerify: true,
MaxVersion: tls.VersionTLS12,
}
proxy := host.NewProxy("", u, config)
addr := &net.TCPAddr{
IP: net.IPv4(127, 0, 0, 1),