Skip to content

Commit

Permalink
fix: #8515, fix login redirect on subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Jul 28, 2020
1 parent 2531c44 commit 5e5815f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/authentication.js
Expand Up @@ -264,7 +264,9 @@ function continueLogin(req, res, next) {
await authenticationController.doLogin(req, userData.uid);
var destination;
if (req.session.returnTo) {
destination = req.session.returnTo;
destination = req.session.returnTo.startsWith('http') ?
req.session.returnTo :
nconf.get('relative_path') + req.session.returnTo;
delete req.session.returnTo;
} else {
destination = nconf.get('relative_path') + '/';
Expand Down

0 comments on commit 5e5815f

Please sign in to comment.