Skip to content

print https:// before public endpoints #1207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jordanstephens
Copy link
Member

Description

Add https:// before non-internal endpoints so that they are clickable from the shell.

Linked Issues

Checklist

  • I have performed a self-review of my code
  • I have added appropriate tests
  • I have updated the Defang CLI docs and/or README to reflect my changes, if necessary

@jordanstephens jordanstephens requested a review from lionello May 23, 2025 21:32
Comment on lines +50 to +53
if endpoint == "" {
continue
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this actually happen? I'd remove it

Suggested change
if endpoint == "" {
continue
}

endpoints = append(endpoints, endpoint)
}
if len(endpoints) == 0 {
endpoints = append(endpoints, "N/A")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a test for this case

continue
}

if !regexp.MustCompile(`\.internal:\d{1,5}$`).MatchString(endpoint) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels brittle. There's some code elsewhere that mirrors this. Perhaps we just check for the port number: no port = https (which is true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants