From 95dcdc7d883d138d17c2e676c1e4cfae0aa2d395 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 15 Feb 2022 12:22:40 +0100 Subject: fix nonsense --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index ce58606..07a1ba5 100644 --- a/main.go +++ b/main.go @@ -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 -- cgit v1.2.3