From 5dff265394533b06d1696601d8bdb54dfd9ac5fa Mon Sep 17 00:00:00 2001 From: zentarul Date: Sun, 10 Dec 2017 20:17:14 -0500 Subject: [PATCH] include the mount path when recreating the original URL --- lib/passport-http-oauth/strategies/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/passport-http-oauth/strategies/utils.js b/lib/passport-http-oauth/strategies/utils.js index 8572623..2332a44 100644 --- a/lib/passport-http-oauth/strategies/utils.js +++ b/lib/passport-http-oauth/strategies/utils.js @@ -26,8 +26,9 @@ exports.originalURL = function(req, defaultHost) { ? 'https' : 'http' , host = defaultHost || headers.host + , base = req.baseUrl || '' , path = req.url || ''; - return protocol + '://' + host + path; + return protocol + '://' + host + base + path; }; /**