zero: use production urls by default (#4814)

This commit is contained in:
Denis Mishin 2023-12-04 20:01:46 -05:00 committed by GitHub
parent 2edd63c58a
commit d2b2ad3250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"
}