mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Elasticsearch: Support HTTPS by inputting https://server (bug #446)
This commit is contained in:
@@ -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'];
|
||||
|
Reference in New Issue
Block a user