Skip to content

Commit

Permalink
Update insecure warning condition
Browse files Browse the repository at this point in the history
This commit updates insecure warning condition and checks for
http.StausAccepted in response status.

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
  • Loading branch information
viveksyngh committed Jan 9, 2019
1 parent 75d68f4 commit accf75b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/secret.go
Expand Up @@ -14,7 +14,7 @@ import (
func GetSecretList(gateway string, tlsInsecure bool) ([]schema.Secret, error) {
var results []schema.Secret

if tlsInsecure {
if !tlsInsecure {
if !strings.HasPrefix(gateway, "https") {
fmt.Println("WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates.")
}
Expand All @@ -40,7 +40,7 @@ func GetSecretList(gateway string, tlsInsecure bool) ([]schema.Secret, error) {
}

switch res.StatusCode {
case http.StatusOK:
case http.StatusOK, http.StatusAccepted:

bytesOut, err := ioutil.ReadAll(res.Body)
if err != nil {
Expand Down

0 comments on commit accf75b

Please sign in to comment.