From dcc96d1f13522d9e81f95f77611fc1266e6dbcd1 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Sun, 13 Feb 2022 18:29:45 +0100 Subject: lowercase insecure_api --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 66dc655..ce58606 100644 --- a/main.go +++ b/main.go @@ -326,7 +326,8 @@ func isValidAPIURI(uri string) bool { return true } if bytes.HasPrefix([]byte(uri), []byte("http://")) { - if os.Getenv("INSECURE_API") == "true" { + insec := os.Getenv("INSECURE_API") + if strings.ToLower(insec) == "true" { return true } else { log.Println("ERROR: Please pass INSECURE_API=true if you need to use a http:// endpoint.") -- cgit v1.2.3