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