Skip to content

Commit

Permalink
support http prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleLollipop committed Nov 7, 2024
1 parent 58a770a commit 7164eea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/appmgr/app_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ func getAppStoreServiceHost() string {
value := os.Getenv(constants.MarketProvider)

if value == "" {
return os.Getenv(constants.AppStoreServiceHostEnv)
} else {
return value
value = os.Getenv(constants.AppStoreServiceHostEnv)
}

if strings.HasPrefix(value, "http") {
value = strings.TrimPrefix(value, "http://")
value = strings.TrimPrefix(value, "https://")
}

return strings.TrimSuffix(value, "/")
}

func getAppStoreServicePort() string {
Expand Down

0 comments on commit 7164eea

Please sign in to comment.