Use hostname from request URL for server name verification.

pull/268/head
zeeZ 2019-10-25 19:21:45 +02:00
parent 2fd1332906
commit 5469c01fff
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ func HttpRequest(url, method string, content interface{}, headers []string, body
transport := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !verifySSL,
ServerName: req.Host,
ServerName: req.URL.Hostname(),
},
DisableKeepAlives: true,
ResponseHeaderTimeout: timeout,