Added host URL normalization
This commit is contained in:
@@ -63,6 +63,10 @@ func (c *Configuration) Validate() error {
|
||||
if !(u.Scheme == "http" || u.Scheme == "https") {
|
||||
return fmt.Errorf("PVE host '%s' must be protocol type of HTTP or HTTPS.", host)
|
||||
}
|
||||
|
||||
if u.Hostname() == "" {
|
||||
return fmt.Errorf("PVE host '%s' must contain an IP address or DNS name.", host)
|
||||
}
|
||||
}
|
||||
|
||||
// Validate PVE token
|
||||
|
||||
Reference in New Issue
Block a user