1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(edge): allow more options for url [EE-2975] (#6781)

This commit is contained in:
Chaim Lev-Ari 2022-05-05 10:03:24 +03:00 committed by GitHub
parent d4c2ad4a57
commit c732ca2d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View file

@ -19,6 +19,10 @@ func ParseHostForEdge(portainerURL string) (string, error) {
portainerHost = parsedURL.Host
}
if portainerHost == "" {
return "", errors.New("hostname cannot be empty")
}
if portainerHost == "localhost" {
return "", errors.New("cannot use localhost as environment URL")
}