mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
Merge pull request #1648 from char101/patch-1
Add relative_path to authentication redirects
This commit is contained in:
@@ -110,8 +110,8 @@
|
||||
require('../socket.io').emitUserCount();
|
||||
|
||||
plugins.fireHook('filter:register.complete', uid, req.body.referrer, function(err, uid, destination) {
|
||||
if(destination) {
|
||||
res.redirect(destination);
|
||||
if (destination) {
|
||||
res.redirect(nconf.get('relative_path') + destination);
|
||||
} else {
|
||||
res.redirect(nconf.get('relative_path') + '/');
|
||||
}
|
||||
@@ -150,8 +150,8 @@
|
||||
}));
|
||||
|
||||
app.get(strategy.callbackURL, passport.authenticate(strategy.name, {
|
||||
successRedirect: '/',
|
||||
failureRedirect: '/login'
|
||||
successRedirect: nconf.get('relative_path') + '/',
|
||||
failureRedirect: nconf.get('relative_path') + '/login'
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user