Skip to content

Commit

Permalink
Merge pull request #3329 from ngrennan-inflection/master
Browse files Browse the repository at this point in the history
Fixing basic http auth
  • Loading branch information
simianhacker committed Mar 17, 2015
2 parents 7dbb084 + d7266d8 commit 27befa6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server/routes/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ router.use(function (req, res, next) {
var path = (/\/$/.test(uri.path)) ? uri.path : uri.path + '/';
path = url.resolve(path, '.' + req.url);

var auth = new Buffer(uri.auth);
base64_auth = auth.toString('base64');
req.headers.authorization = "Basic " + base64_auth;

var options = {
url: uri.protocol + '//' + uri.host + path,
url: config.elasticsearch + path,
method: req.method,
headers: _.defaults({ host: target.hostname }, req.headers),
strictSSL: config.kibana.verify_ssl,
Expand Down

0 comments on commit 27befa6

Please sign in to comment.