MXS-2322: Fix maxctrl authentication

The username and password are now explicitly passed to request instead of
being added into the URI manually.
This commit is contained in:
Markus Mäkelä 2019-02-08 10:01:48 +02:00
parent 994bfcd285
commit 1be845c438
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -245,7 +245,7 @@ module.exports = function() {
base = 'https://'
}
return base + argv.u + ':' + argv.p + '@' + host + '/v1/' + endpoint
return base + host + '/v1/' + endpoint
}
this.OK = function() {
@ -283,6 +283,7 @@ module.exports = function() {
this.doAsyncRequest = function(host, resource, cb, obj) {
args = obj || {}
args.uri = getUri(host, this.argv.secure, resource)
args.auth = {user: argv.u, pass: argv.p}
args.json = true
args.timeout = this.argv.timeout
setTlsCerts(args)