Skip to content

Commit

Permalink
fix: nosec issue
Browse files Browse the repository at this point in the history
Signed-off-by: Janar Juusu <janar@juusujanar.eu>
  • Loading branch information
juusujanar committed Apr 22, 2024
1 parent 558c715 commit 5ffe7ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ttn_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ func NewExporter(uri string, apiKey string, sslVerify bool, timeout time.Duratio
if !strings.HasPrefix(uri, "https://") && !strings.HasPrefix(uri, "http://") {
return nil, errors.New("invalid URI scheme")
}
/* #nosec G402 -- allow insecure TLS when requested by user */

return &Exporter{
URI: uri,
apiKey: apiKey,
client: &http.Client{
Timeout: timeout,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: !sslVerify,
InsecureSkipVerify: !sslVerify, // #nosec G402 -- allow insecure TLS when requested by user
},
},
},
Expand Down

0 comments on commit 5ffe7ed

Please sign in to comment.