summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2022-02-13 18:29:45 +0100
committerkali kaneko (leap communications) <kali@leap.se>2022-02-13 18:29:45 +0100
commitdcc96d1f13522d9e81f95f77611fc1266e6dbcd1 (patch)
treeb95241027ddb4eb2723177000c21cad90aa9f422
parent3246cfbfbed6da51959dcf06f6e643b54c15c546 (diff)
lowercase insecure_api
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
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.")