mirror of https://github.com/statping/statping
Merge pull request #482 from craftbyte/feature/tls-renegotiation
Set HTTPS TLS renegotiation to "once as client"pull/548/head
commit
2893218ed6
|
@ -5,7 +5,6 @@ import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/ararog/timeago"
|
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
|
@ -15,6 +14,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ararog/timeago"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -234,6 +235,7 @@ func HttpRequest(url, method string, content interface{}, headers []string, body
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: !verifySSL,
|
InsecureSkipVerify: !verifySSL,
|
||||||
ServerName: verifyHost,
|
ServerName: verifyHost,
|
||||||
|
Renegotiation: tls.RenegotiateOnceAsClient,
|
||||||
},
|
},
|
||||||
DisableKeepAlives: true,
|
DisableKeepAlives: true,
|
||||||
ResponseHeaderTimeout: timeout,
|
ResponseHeaderTimeout: timeout,
|
||||||
|
|
Loading…
Reference in New Issue