mirror of https://github.com/statping/statping
Use hostname from request URL for server name verification.
parent
2fd1332906
commit
5469c01fff
|
@ -308,7 +308,7 @@ func HttpRequest(url, method string, content interface{}, headers []string, body
|
||||||
transport := &http.Transport{
|
transport := &http.Transport{
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: !verifySSL,
|
InsecureSkipVerify: !verifySSL,
|
||||||
ServerName: req.Host,
|
ServerName: req.URL.Hostname(),
|
||||||
},
|
},
|
||||||
DisableKeepAlives: true,
|
DisableKeepAlives: true,
|
||||||
ResponseHeaderTimeout: timeout,
|
ResponseHeaderTimeout: timeout,
|
||||||
|
|
Loading…
Reference in New Issue