Add env var to skip TLS verify

This makes it much easier to debug with mitmproxy
This commit is contained in:
Eli Ribble 2026-02-25 02:45:17 +00:00
parent 6cccc16031
commit ca88a0eaab
No known key found for this signature in database

View file

@ -1,6 +1,8 @@
package stadia
import (
"crypto/tls"
"os"
"resty.dev/v3"
//"github.com/rs/zerolog/log"
)
@ -17,6 +19,11 @@ func NewStadiaMaps(api_key string) *StadiaMaps {
//r := resty.New().SetLogger(logger).SetDebug(true)
//r := resty.New().SetDebug(true)
r := resty.New()
if os.Getenv("STADIA_INSECURE_SKIP_VERIFY") != "" {
r.SetTLSClientConfig(&tls.Config{
InsecureSkipVerify: true,
})
}
return &StadiaMaps{
APIKey: api_key,
client: r,