Skip to content

Commit

Permalink
feat: Added proxy support
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed Nov 29, 2023
1 parent 3c2f14f commit 06114aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ func main() {
}

if e, found := os.LookupEnv("TLS_INSECURE_SKIP_VERIFY"); found && e == "true" {
logrus.Warn("Disabling TLS verification")
c.Resty.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
}

if p, found := os.LookupEnv("VCENTER_PROXY_URL"); found {
logrus.Debug("Setting proxy URL")
c.Resty.SetProxy(p)
}

logrus.Debug("Starting server")

gin.SetMode(gin.ReleaseMode)
Expand Down

0 comments on commit 06114aa

Please sign in to comment.