Skip to content

Commit

Permalink
fix: fix the issue of cleanup invalid pac servers (#963)
Browse files Browse the repository at this point in the history
fix the issue of cleanup invalid pac servers
  • Loading branch information
xinredhat authored Dec 15, 2023
1 parent 35c782d commit b3d02aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"encoding/json"
"fmt"
"net"
"net/http"
"os"
"reflect"
Expand Down Expand Up @@ -1102,6 +1101,6 @@ func CleanupRegisteredPacServers() error {
}

func isValidPacHost(server string) bool {
_, err := net.LookupHost(strings.TrimPrefix(server, "https://"))
_, err := http.Get(strings.TrimSpace(server))
return err == nil
}

0 comments on commit b3d02aa

Please sign in to comment.