mirror of
https://github.com/foomo/walker.git
synced 2025-10-16 12:45:39 +00:00
disable SSL certificate verification on crawler
This commit is contained in:
parent
5c50c10c9e
commit
6b2b0d344c
@ -2,6 +2,7 @@ package walker
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/tls"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
@ -55,6 +56,10 @@ func newClientPool(concurrency int, agent string, useCookies bool) *clientPool {
|
|||||||
IdleConnTimeout: 15 * time.Second,
|
IdleConnTimeout: 15 * time.Second,
|
||||||
TLSHandshakeTimeout: 5 * time.Second,
|
TLSHandshakeTimeout: 5 * time.Second,
|
||||||
ExpectContinueTimeout: 1 * time.Second,
|
ExpectContinueTimeout: 1 * time.Second,
|
||||||
|
TLSClientConfig: &tls.Config{
|
||||||
|
// disable SSL certificate verification
|
||||||
|
InsecureSkipVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user