feat(http): add option to skip SSL certificate verification (#801)

This commit is contained in:
Ricky authored and GitHub committed 2024-11-12 10:30:21 +08:00
1 parent 3384f5197a
commit 2523282a89
19 files changed
+48 -1

No files matched your search

+4
View File
@@ -3,6 +3,7 @@ package http
import (
"bytes"
"context"
"crypto/tls"
"errors"
"fmt"
"io"
@@ -449,6 +450,9 @@ func (f *Fetcher) splitChunk() (chunks []*chunk) {
func (f *Fetcher) buildClient() *http.Client {
transport := &http.Transport{
Proxy: f.ctl.GetProxy(f.meta.Req.Proxy),
TLSClientConfig: &tls.Config{
InsecureSkipVerify: f.meta.Req.SkipVerifyCert,
},
}
// Cookie handle
jar, _ := cookiejar.New(nil)