Rename TlsVerify to TLSVerify

This commit is contained in:
Mike Cardwell 2020-11-25 08:53:21 +00:00
parent 900bb1254e
commit fb0c7292ac
2 changed files with 3 additions and 3 deletions

View File

@ -467,7 +467,7 @@ func UnmarshalPluginsFromIni(sections ini.File, cfg *ServerCommonConf) {
Addr: section["addr"], Addr: section["addr"],
Path: section["path"], Path: section["path"],
Ops: strings.Split(section["ops"], ","), Ops: strings.Split(section["ops"], ","),
TlsVerify: tls_verify, TLSVerify: tls_verify,
} }
for i := range options.Ops { for i := range options.Ops {
options.Ops[i] = strings.TrimSpace(options.Ops[i]) options.Ops[i] = strings.TrimSpace(options.Ops[i])

View File

@ -32,7 +32,7 @@ type HTTPPluginOptions struct {
Addr string Addr string
Path string Path string
Ops []string Ops []string
TlsVerify bool TLSVerify bool
} }
type httpPlugin struct { type httpPlugin struct {
@ -44,7 +44,7 @@ type httpPlugin struct {
func NewHTTPPluginOptions(options HTTPPluginOptions) Plugin { func NewHTTPPluginOptions(options HTTPPluginOptions) Plugin {
var client *http.Client var client *http.Client
if options.TlsVerify == false { if options.TLSVerify == false {
tr := &http.Transport{ tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
} }