Node.js如何获取先前的网址

I want to get previous url, for example in all my /admin routes I open a form where the admin needs to re-enter his password to get redirected to the route he requested, but the problem is after I validate his password and I try to redirect him to the route he initially requested, I don't have this route anymore, it's lost. For example, admin requests /admin/register, a form appears that posts to validate-password, and then if finds the password matches, it should redirect the user to the route he once requested, but I don't know how to get the initial route he requested

我找不到他输入密码的路线

router.all('/admin/*', isAdmin, (req, res, next) => {
    res.render('validatePassword', {message: 'Please re-enter your password to get access to ' + req.originalUrl});
    // next();
});

router.get('/admin/register', (req, res) => {
    res.render('register', {message: req.flash('message'), role_id: req.user.role_id})
});


// Validate password, admin re-enter password to get access to /admin routes
router.post('/validate-password', async (req, res, next) => {
    const password = req.body.password;
    const match = await passwordController.comparePassword(password, req.user.password);
    console.log(password);
    if (match) {
        // return res.redirect('/' +); HOW DO I REDIRECT HERE
        return next();
    } else {
        // return res.render('changePassword', {role_id: req.user.role_id});
        return res.render('validatePassword', {message: 'Wrong password'});
    }
});