mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-06 01:06:26 +08:00
Fixed https prepend logic (#265)
This commit is contained in:
committed by
Victor Vrantchan
parent
aab6e291eb
commit
a0b092af5c
@@ -97,8 +97,8 @@ func setCmd(cfg *ClientConfig, args []string) error {
|
||||
}
|
||||
|
||||
if *flServerURL != "" {
|
||||
if !strings.HasPrefix(*flServerURL, "http") ||
|
||||
!strings.HasPrefix(*flServerURL, "https") {
|
||||
if !(strings.HasPrefix(*flServerURL, "http") ||
|
||||
strings.HasPrefix(*flServerURL, "https")) {
|
||||
*flServerURL = "https://" + *flServerURL
|
||||
}
|
||||
u, err := url.Parse(*flServerURL)
|
||||
|
||||
Reference in New Issue
Block a user