diff options
-rw-r--r-- | main.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -16,7 +16,6 @@ package main import ( - "bytes" "encoding/json" "flag" "fmt" @@ -322,10 +321,10 @@ func main() { } func isValidAPIURI(uri string) bool { - if bytes.HasPrefix([]byte(uri), []byte("https://")) { + if strings.HasPrefix(uri, "https://") { return true } - if bytes.HasPrefix([]byte(uri), []byte("http://")) { + if strings.HasPrefix(uri, "http://") { insec := os.Getenv("INSECURE_API") if strings.ToLower(insec) == "true" { return true |