Skip to content

Commit

Permalink
Don't natively output the proxy, only do it if DEBUG mode is on
Browse files Browse the repository at this point in the history
  • Loading branch information
asteel-gsa committed May 30, 2024
1 parent 2f1b6ae commit 0636606
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/util/unset_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import (

func UnsetProxy() {
if slices.Contains([]string{"DEV", "PREVIEW", "STAGING", "PRODUCTION"}, os.Getenv("ENV")) {
logging.Logger.Println("Proxy:", os.Getenv("https_proxy"))
if IsDebugLevel("DEBUG") {
logging.Logger.Println("Proxy:", os.Getenv("https_proxy"))
}
logging.Logger.Printf("Unsetting https_proxy variable...")
os.Unsetenv("https_proxy")
logging.Logger.Println("DEBUG - Proxy after Unsetenv():", os.Getenv("https_proxy"))
Expand Down

0 comments on commit 0636606

Please sign in to comment.