You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Launch a feathers app with at least one rest path, e.g. /hello
Hit that path with some letters capitalized differently, e.g. /HELLO
Expected behavior
Any capitalization of the path should hit the same feathers service.
It appears that paths were matched in a case-insensitive manner prior to feathers 5.
Actual behavior
Exact capitalization is required. It does not appear to be configurable.
System configuration
We recently upgraded from feathers 4.5.11 to 5.0.8.
We found relevant code in packages/transport-commons/src/routing/router.ts, which is on 5.0.8.
Node 16.14.0, although I can't imagine that's relevant.
Code Sample
We're using express, and we tried playing with express properties to control case-sensitivity, e.g.
// app is the express app in this snippet, not a feathers app
app.set('case sensitive routing', true);
We played with several variants of constructing an express app and configuring it's path matching, then associating it with a feathers app. After we found packages/transport-commons/src/routing/router.ts it became clear that the path matching isn't using express' built-in behavior at all.
We've worked around this by changing the path matching behavior in packages/transport-commons/src/routing/router.ts. Our snippet is slightly more complicated, but the relevant change is:
Steps to reproduce
/hello
/HELLO
Expected behavior
Any capitalization of the path should hit the same feathers service.
It appears that paths were matched in a case-insensitive manner prior to feathers 5.
Actual behavior
Exact capitalization is required. It does not appear to be configurable.
System configuration
packages/transport-commons/src/routing/router.ts
, which is on 5.0.8.Code Sample
We're using express, and we tried playing with express properties to control case-sensitivity, e.g.
We played with several variants of constructing an express app and configuring it's path matching, then associating it with a feathers app. After we found
packages/transport-commons/src/routing/router.ts
it became clear that the path matching isn't using express' built-in behavior at all.We found some text in this document https://feathersjs.com/guides/whats-new.html that references new path matching behavior, but no mention of case sensitivity. That links to https://feathersjs.com/api/application.html#lookup-path, but ditto.
We've worked around this by changing the path matching behavior in
packages/transport-commons/src/routing/router.ts
. Our snippet is slightly more complicated, but the relevant change is:The text was updated successfully, but these errors were encountered: