x-pack权限认证+ bigdesk + Es 5.x
bigdesk下载 zip
解压
修改bigdesk-master/_site/js/util/bigdesk_extension.js
sync: function(method, model, options) {
//options.dataType = 'jsonp';
options.url = this.getBaseUrl() + this.url();
//追加请求头 Authorization
//ZWxhc3RpYzpjaGFuZ2VtZQ== 则是 user:password 的base64加密值
options.beforeSend = function (xhr) {
xhr.setRequestHeader('Authorization', 'Basic ZWxhc3RpYzpjaGFuZ2VtZQ==');
}
return Backbone.sync(method, model, options);
}
bigdesk 集成用户验证,只需在请求头 中加入 Authorization :’Basic user:password的base64加密值’