Closed jonsam-ng closed 2 months ago
Do you think you need this per route? There are already options for Wayne constructor, I can add the option there. What you think?
I would prefer to 'ignoreCaseSensitive' per route because I'm not sure if the corresponding service is case sensitive. Registering a case-insensitive route allows me to easily respond to different styles of requests without having to register multiple times.
In version 0.17.0 there is an option: caseSensitive
:
app.get('/message', (req, res) => {
res.json({ message: 'Hello' });
}, { caseSensitive: false });
What will be like?
when
ignoreCaseSensitive
param provided, we can match routes like/message
or/MESSAGE
that case not sensitive any more.Why we need this?
Sometime we want to match some requests that url case pattern not sure, but we know case not sensitive on service. So we don't need to register paths for all different cases.