Skip to content

req.params not in correct order when use a * before #2617

@ECP-Black

Description

@ECP-Black

Hello

i have a problem with the params in the url (express v 4.12.3):

var express = require('express');
var app = express();

app.get('*/test/:id/status', function (req, res) {
    res.send(req.params);
});
app.listen(3000);

When requesting with the url:
http://localhost:3000/a/b/d/test/theId/status

the output will be:

 { '0': 'theId', id: '/a/b/d' }

The wildcard will be assign to the param id.

Kind regards,
Dennis

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions