Skip to content

Commit efadd2a

Browse files
committed
Remove function
1 parent 867a099 commit efadd2a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pkg/platform/api/settings.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func GetServiceURL(service Service) *url.URL {
135135
serviceURL.Host = *host
136136
}
137137

138-
if insecure := getProjectHostFromEnv(); insecure == "true" {
138+
if insecure := os.Getenv(constants.APIHostEnvVarName); insecure == "true" {
139139
if serviceURL.Scheme == "https" || serviceURL.Scheme == "wss" {
140140
serviceURL.Scheme = strings.TrimRight(serviceURL.Scheme, "s")
141141
}
@@ -187,12 +187,8 @@ func getProjectHostFromConfig() string {
187187
return cfg.GetString(constants.APIHostConfig)
188188
}
189189

190-
func getProjectHostFromEnv() string {
191-
return os.Getenv(constants.APIHostEnvVarName)
192-
}
193-
194190
func HostOverride() string {
195-
if apiHost := getProjectHostFromEnv(); apiHost != "" {
191+
if apiHost := os.Getenv(constants.APIHostEnvVarName); apiHost != "" {
196192
return apiHost
197193
}
198194

0 commit comments

Comments
 (0)