Skip to content

Commit

Permalink
skip https append for plugin discovery endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandra Pamuluri committed Apr 24, 2023
1 parent 408cbae commit 67cffd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/pluginmanager/default_discoveries.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package pluginmanager

import (
"fmt"
"os"
"strings"

configtypes "github.com/vmware-tanzu/tanzu-plugin-runtime/config/types"
Expand Down Expand Up @@ -57,6 +58,9 @@ func defaultDiscoverySourceForTMCTargetedContext(context *configtypes.Context) c
}

func appendURLScheme(endpoint string) string {
if os.Getenv("TANZU_CLI_E2E_TEST_ENVIRONMENT") == "true" {
return endpoint
}
e := strings.Split(endpoint, ":")[0]
if !strings.Contains(e, "https") {
return fmt.Sprintf("https://%s", e)
Expand Down

0 comments on commit 67cffd7

Please sign in to comment.