Closed amhn closed 1 year ago
Hello @amhn, could you please rebase and we will see if the linter is ok.
Done. Lint error stays. Is NETBOX_INSECURE set in the CI-Variables? On my machine I do not get this error.
(Sorry. Took me a while to react, occupied with other things.)
Changing the way to handle insecure seems to have helped. I.e. not creating a new TLSConfig but setting InsecureSkipVerify on the existing.
I have NOT tested this change with an invalid certificate.
fixes: #206
Reasons to remove transport struct and simplify client setup
This allowed to use the default client with the default transport and. if insecure is set, with a simplified tls.Config. I did not check the behaviour with insecure = true, as I do not have a setup for this. http and https with a trusted cert is confirmed working.
If you think this is too big of a change, the following should work too: