Ignore static files when setting redirect path

master
Keith Irwin 2017-05-07 02:10:13 -04:00
parent e23c00f41c
commit 359e7d1b94
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,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' ){
if ( nextPath.substring(0,6)!=='/login' && nextPath.substring(0,7)!=='/logout' && nextPath.substring(0,7)!=='/static' ){
req.session.next = nextPath+'#';
winston.debug(`Set redirect path to ${nextPath}#`);
}