From a874c88c51e06d1a417e5be1f25c1cf5ef5031ee Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Tue, 22 Aug 2017 18:55:52 -0400 Subject: [PATCH] #108 Fixed redirect loop for /signup when already logged in --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 95ee674..c3a9f48 100755 --- a/server.js +++ b/server.js @@ -81,7 +81,7 @@ const // Path for redirects let nextPath = ((req.query.next)?req.query.next: req.path.substring(0,req.path.indexOf('#')) || req.path ); - if ( nextPath.substring(0,6)!=='/login' && nextPath.substring(0,7)!=='/logout' && nextPath.substring(0,7)!=='/static' ){ + if ( nextPath.substring(0,6)!=='/login' && nextPath.substring(0,7)!=='signup' && nextPath.substring(0,7)!=='/logout' && nextPath.substring(0,7)!=='/static' ){ req.session.next = nextPath+'#'; debug(`Set redirect path to ${nextPath}#`); }