Express v5 completely removed the magic res.redirect('back') feature now you must manually grab the referrer header with req.get('Referrer') to redirect to the previous page.​
NestJS 11+ uses Express v5 by default, so res.redirect('back') just fails silently or goes to root. Replace it with res.redirect(req.get('Referrer') || '/') to get the actual previous page, or use NestJS's @Req() decorator to access the request object safely. Pro tip: Check for Helmet middleware—it might block referrers too
.png)

.png)
