Skip to content

Commit 06f8648

Browse files
committed
For now, use Ports in ServiceInfo
1 parent fa236b1 commit 06f8648

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/cmd/cli/command/deploymentinfo.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package command
22

33
import (
4-
"strings"
5-
64
"github.com/DefangLabs/defang/src/pkg/cli"
75
cliClient "github.com/DefangLabs/defang/src/pkg/cli/client"
86
"github.com/DefangLabs/defang/src/pkg/term"
@@ -35,9 +33,9 @@ func printEndpoints(serviceInfos []*defangv1.ServiceInfo) {
3533
}
3634

3735
term.Info("Service", serviceInfo.Service.Name, serviceConditionText, andEndpoints)
38-
for _, endpoint := range serviceInfo.Endpoints {
39-
if url, ok := strings.CutSuffix(endpoint, ":443"); ok {
40-
endpoint = "https://" + url
36+
for i, endpoint := range serviceInfo.Endpoints {
37+
if serviceInfo.Service.Ports[i].Mode == defangv1.Mode_INGRESS {
38+
endpoint = "https://" + endpoint
4139
}
4240
term.Println(" -", endpoint)
4341
}

0 commit comments

Comments
 (0)