Skip to content

Commit

Permalink
fixed Elasticsearch http https validation (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
voxparcxls authored Jan 26, 2022
1 parent bfd8125 commit c4c35d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,13 @@ private static int validateElasticsearch() {
return 1;
}

if (!(elasticsearch_host.startsWith("https://") || elasticsearch_host.startsWith("http://")) ) {
print(" [WARNING]");
print(" It was determined that the user provided Elasticsearch endpoint '" + elasticsearch_host + "' did not properly set or include protocol 'http://' OR 'https://'");
print("");
return 1;
}

print(" [OK]");
print("");
return 0; // no warnings
Expand Down

0 comments on commit c4c35d3

Please sign in to comment.