diff --git a/internal/zero/cmd/env.go b/internal/zero/cmd/env.go index a06811613..13f94e6d9 100644 --- a/internal/zero/cmd/env.go +++ b/internal/zero/cmd/env.go @@ -29,3 +29,17 @@ func getToken(configFile string) string { // we will fallback to normal pomerium if empty return "" } + +func getConnectAPIEndpoint() string { + if endpoint := os.Getenv("CONNECT_SERVER_ENDPOINT"); endpoint != "" { + return endpoint + } + return "https://connect.pomerium.app" +} + +func getClusterAPIEndpoint() string { + if endpoint := os.Getenv("CLUSTER_API_ENDPOINT"); endpoint != "" { + return endpoint + } + return "https://console.pomerium.app/cluster/v1" +} diff --git a/internal/zero/cmd/env_dev.go b/internal/zero/cmd/env_dev.go deleted file mode 100644 index 99123ff4e..000000000 --- a/internal/zero/cmd/env_dev.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build !release - -package cmd - -import "os" - -func getConnectAPIEndpoint() string { - connectServerEndpoint := os.Getenv("CONNECT_SERVER_ENDPOINT") - if connectServerEndpoint == "" { - connectServerEndpoint = "http://localhost:8721" - } - return connectServerEndpoint -} - -func getClusterAPIEndpoint() string { - clusterAPIEndpoint := os.Getenv("CLUSTER_API_ENDPOINT") - if clusterAPIEndpoint == "" { - clusterAPIEndpoint = "http://localhost:8720/cluster/v1" - } - return clusterAPIEndpoint -} diff --git a/internal/zero/cmd/env_release.go b/internal/zero/cmd/env_release.go deleted file mode 100644 index 277dfba99..000000000 --- a/internal/zero/cmd/env_release.go +++ /dev/null @@ -1,11 +0,0 @@ -//go:build release - -package cmd - -func getConnectAPIEndpoint() string { - return "https://connect.pomerium.app" -} - -func getClusterAPIEndpoint() string { - return "https://console.pomerium.app/cluster/v1" -}