Skip to content

Commit

Permalink
Merge pull request #3374 from simianhacker/fix/3329-errors
Browse files Browse the repository at this point in the history
Fixing an error with a merged PR
  • Loading branch information
simianhacker committed Mar 17, 2015
2 parents 27befa6 + eda5dc7 commit 8a0536c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/server/routes/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ 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;
if (uri.auth) {
var auth = new Buffer(uri.auth);
base64_auth = auth.toString('base64');
req.headers.authorization = "Basic " + base64_auth;
}

var options = {
url: config.elasticsearch + path,
Expand Down

0 comments on commit 8a0536c

Please sign in to comment.