Skip to content

Commit

Permalink
fix(http): do not skip checking TLS certificate
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Zipitria <[email protected]>
  • Loading branch information
fzipi committed Apr 17, 2021
1 parent 2e99290 commit 19520c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func NewConnection(d Destination) (*Connection, error) {
// Fatal error: dial tcp 127.0.0.1:80: connect: connection refused
// strings.HasSuffix(err.String(), "connection refused") {
if strings.ToLower(d.Protocol) == "https" {
tlsConn, err = tls.Dial("tcp", hostPort, &tls.Config{InsecureSkipVerify: true})
// Commenting InsecureSkipVerify: true.
tlsConn, err = tls.Dial("tcp", hostPort, &tls.Config{})
} else {
netConn, err = net.DialTimeout("tcp", hostPort, timeout)
}
Expand Down

0 comments on commit 19520c7

Please sign in to comment.