Skip to content

Commit

Permalink
Merge pull request #4 from LeakIX/develop
Browse files Browse the repository at this point in the history
SSL Cache
  • Loading branch information
gboddin authored Jul 5, 2021
2 parents d340f1d + 81c5995 commit a8a5da5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion l9plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type ServicePluginInterface interface {
type ServicePluginBase struct {
}

var TlsSessionCache = tls.NewLRUClientSessionCache(4096)

func (plugin ServicePluginBase) Init() error {
return nil
}
Expand Down Expand Up @@ -81,7 +83,7 @@ func (plugin ServicePluginBase) GetHttpClient(ctx context.Context, ip string, po
ResponseHeaderTimeout: 2 * time.Second,
ExpectContinueTimeout: 2 * time.Second,
DisableKeepAlives: true,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
TLSClientConfig: &tls.Config{InsecureSkipVerify: true,ClientSessionCache: TlsSessionCache},
},
Timeout: 5 * time.Second,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
Expand Down

0 comments on commit a8a5da5

Please sign in to comment.