Set HTTPS TLS renegotiation to "once as client"

pull/482/head
Anže Jenšterle 2020-04-05 18:33:52 +02:00
parent efcdd9fdd8
commit 16316ba89e
No known key found for this signature in database
GPG Key ID: 56821505069EBF5F
1 changed files with 3 additions and 1 deletions

View File

@ -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 (
@ -269,6 +270,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,