Closed
Description
Hello, when i assign a router to the route, then there is access to routes with a double slash at the beginning.
example:
const express = require('express');
const app = express();
const port = 3000;
const router = express.Router({ strict: true }); // i've tried without strict mode
router.get('/test', (req, res) => {
res.send('test');
});
app.use('/user', router);
app.listen(port, () => console.log(`app listening on port ${port}!`))
The router is supposed to run on the /user/test
route, but the /user//test
also works.
Environment:
"node": 14.3.0
"express": 4.17.1