79192267

Date: 2024-11-15 11:59:00
Score: 0.5
Natty:
Report link

Just putting this out there - if like me you're using the default of expressJS - you can add the following middleware in the app.js file:

app.use(function (req, res, next) {
  res.locals.req = req;
  next();
});

and then in the nunjucks template you can reference it simply by putting {{req.originalUrl}}

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: hyper_st8