From 4b03006b4d9ed1987f73789c643e992e8a023616 Mon Sep 17 00:00:00 2001 From: Howard Tyson Date: Tue, 19 May 2015 15:28:26 -0400 Subject: [PATCH] Fixing call to undefined route and issue with not returning the req. --- lib/Route.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Route.js b/lib/Route.js index 13d535a..56af8e0 100644 --- a/lib/Route.js +++ b/lib/Route.js @@ -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.