zero: use production urls by default

This commit is contained in:
Denis Mishin 2023-12-04 18:23:49 -05:00
parent 2edd63c58a
commit efb9f544f8
3 changed files with 14 additions and 32 deletions

View file

@ -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"
}

View file

@ -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
}

View file

@ -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"
}