Skip to content

Commit

Permalink
Added HOST_IP_ENV variable, to use to force the ip address
Browse files Browse the repository at this point in the history
  • Loading branch information
vvalerio-priv committed Nov 9, 2023
1 parent 0be35eb commit 9758a99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ func setupIPs() {
localAddr := conn.LocalAddr().(*net.UDPAddr)

val, present := os.LookupEnv("API_HOST_ENV")
if !present {
if present {
fmt.Print(val)
} else {
os.Setenv("API_HOST_ENV", localAddr.IP.String())
}

Expand Down

0 comments on commit 9758a99

Please sign in to comment.