mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
fix: #9492, keep query params on redirect
This commit is contained in:
@@ -194,9 +194,8 @@ module.exports = function (middleware) {
|
||||
if (!userslug) {
|
||||
return next();
|
||||
}
|
||||
const path = req.path.replace(/^\/api/, '')
|
||||
.replace('uid', 'user')
|
||||
.replace(uid, () => userslug);
|
||||
const path = req.url.replace(/^\/api/, '')
|
||||
.replace(`/uid/${uid}`, () => `/user/${userslug}`);
|
||||
controllers.helpers.redirect(res, path);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user