Merge "Append default podm username/password"
This commit is contained in:
commit
ce11d4b4a9
@ -3,6 +3,8 @@
|
||||
*/
|
||||
|
||||
exports.url = "http://127.0.0.1:6000"
|
||||
exports.username = "admin"
|
||||
exports.password = "admin"
|
||||
|
||||
exports.nodeConfig =
|
||||
{
|
||||
|
@ -1,6 +1,15 @@
|
||||
var config = require('./config.js');
|
||||
var util = require('./util.js');
|
||||
|
||||
// Base64 username:password on client-side, and append into request header
|
||||
$.ajaxSetup({
|
||||
beforeSend: function (xhr)
|
||||
{
|
||||
xhr.setRequestHeader('Authorization',
|
||||
'Basic ' + btoa(config.username + ':' + config.password));
|
||||
}
|
||||
});
|
||||
|
||||
exports.getPods = function(callback) {
|
||||
var url = config.url + '/redfish/v1/Chassis';
|
||||
$.ajax({
|
||||
|
Loading…
x
Reference in New Issue
Block a user