summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2022-02-15 12:22:40 +0100
committerkali kaneko (leap communications) <kali@leap.se>2022-02-15 12:26:05 +0100
commit95dcdc7d883d138d17c2e676c1e4cfae0aa2d395 (patch)
tree0fbf60445d9b335e2cbe896f768736e877006159
parentdcc96d1f13522d9e81f95f77611fc1266e6dbcd1 (diff)
fix nonsense
-rw-r--r--main.go5
1 files 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