diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2022-02-15 12:22:40 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2022-02-15 12:26:05 +0100 |
commit | 95dcdc7d883d138d17c2e676c1e4cfae0aa2d395 (patch) | |
tree | 0fbf60445d9b335e2cbe896f768736e877006159 | |
parent | dcc96d1f13522d9e81f95f77611fc1266e6dbcd1 (diff) |
fix nonsense
-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 |