Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Fixing call to undefined route and issue with not returning the req.
Browse files Browse the repository at this point in the history
  • Loading branch information
tizzo committed May 19, 2015
1 parent 5a5657a commit 4b03006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Route.js
Expand Up @@ -85,12 +85,13 @@ Route.prototype.rewriteRequest = function(request) {
request.headers['X-Forwarded-Proto'] = 'https';
// Allow the auth proxy to supply basic auth for systems that require some form of auth.
if (this.basicAuth && this.basicAuth.name && this.basicAuth.password) {
var authString = (new Buffer(route.basicAuth.name + ':' + route.basicAuth.password, "ascii")).toString("base64");
var authString = (new Buffer(this.basicAuth.name + ':' + this.basicAuth.password, "ascii")).toString("base64");
request.headers.Authorization = 'Basic ' + authString;
}
if (request.user && request.user.email) {
request.headers['X-Forwarded-User'] = request.user.email;
}
return request;
};

// Rewrite the request to ensure that the location header is properly rewritten.
Expand Down

0 comments on commit 4b03006

Please sign in to comment.