add support for disabling relay via environment variable

This commit is contained in:
Zoltán Papp
2026-02-18 18:59:56 +01:00
parent 93f530637d
commit 2ea7fb7b21
4 changed files with 27 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
package client
import (
"os"
"strconv"
)
const (
envKeyNBDebugDisableRelay = "NB_DEBUG_DISABLE_RELAY"
)
func IsDisableRelay() bool {
v, _ := strconv.ParseBool(os.Getenv(envKeyNBDebugDisableRelay))
return v
}