diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2022-02-13 18:29:45 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2022-02-13 18:29:45 +0100 |
commit | dcc96d1f13522d9e81f95f77611fc1266e6dbcd1 (patch) | |
tree | b95241027ddb4eb2723177000c21cad90aa9f422 | |
parent | 3246cfbfbed6da51959dcf06f6e643b54c15c546 (diff) |
lowercase insecure_api
-rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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.") |