`App.use(path, ...)` Does Not Mount at `'//'`
Open
bug
module:router
- Dominant language
- JavaScript
- Stars
- 69.5k
- Forks
- 25k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
`Router` instance mounted explicitly at `'//'` exposes routes when path begins only with a single `/`:
```javascript
const TestRoutes = express.Router();
TestRoutes.get('/drop/table/:table', (req, res) => {
// drop table
res.send(`Dropped table '${req.params.table}'`);
})
TestRoutes.get('/', sendListOfTestRoutes);
if (TEST) app.use('//', TestRoutes);
app.listen();
```
Expected behavior is that navigating to `http://hostname/` would bypass this `Router` and go to the main app, but instead Express serves the list of test routes mounted within the router at `//`.
Contributor guide
Assessment
This issue has not been assessed yet.