If you are use some nested request handlers, for example:
var Router = require('express').Router;
var router = new Router();
var anotherRouter = new Router();
router.get('/', reqHandler);
anotherRouter.get('/', anotherReqHandler);
app
.use(router)
.use(anotherRouter)
req.url will be show relative url in this nested route handlers. So we must use req.originalUrl which always show full request url.
If you are use some nested request handlers, for example:
req.url will be show relative url in this nested route handlers. So we must use req.originalUrl which always show full request url.