Elasticsearch: Support HTTPS by inputting https://server (bug #446)

This commit is contained in:
Jakub Vrana 2017-02-20 18:06:14 +01:00
parent fa09eba15e
commit 9df33e82e6
2 changed files with 3 additions and 1 deletions

View file

@ -59,7 +59,8 @@ if (isset($_GET["elastic"])) {
}
function connect($server, $username, $password) {
$this->_url = "http://$username:$password@$server/";
preg_match('~^(https?://)?(.+)~', $server, $match);
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
$return = $this->query('');
if ($return) {
$this->server_info = $return['version']['number'];

View file

@ -7,6 +7,7 @@ MySQL: Support spatial indexes
PostgreSQL: Export
PostgreSQL: Don't treat partial indexes as unique
MS SQL: Support pdo_dblib
Elasticsearch: Support HTTPS by inputting https://server
Adminer 4.2.5 (released 2016-06-01):
Fix remote execution in SQLite query