Skip to content

Commit

Permalink
Fix protocol detection from https system property (opensearch-project#61
Browse files Browse the repository at this point in the history
)

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta authored Sep 15, 2023
1 parent c0aa957 commit 2cfae7d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import javax.net.ssl.SSLEngine;
Expand Down Expand Up @@ -131,7 +132,7 @@ public TlsDetails create(final SSLEngine sslEngine) {

@Override
protected String getProtocol() {
return Strings.isNullOrEmpty(System.getProperty("https")) ? "http" : "https";
return Objects.equals(System.getProperty("https"), "true") ? "https" : "http";
}

/**
Expand Down

0 comments on commit 2cfae7d

Please sign in to comment.