Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fluxible-router] case-sensitive routing #435

Open
gabor opened this issue Apr 27, 2016 · 1 comment
Open

[fluxible-router] case-sensitive routing #435

gabor opened this issue Apr 27, 2016 · 1 comment

Comments

@gabor
Copy link

gabor commented Apr 27, 2016

the routing in fluxible-router is case insensitive currently. i'd like to use case-sensitive routing..

it seems that fluxible-router uses routr, which in turn uses path-to-regexp, which has an option for this, but it's not possible to pass down this option to it.

basically this line https://github.com/yahoo/routr/blob/master/lib/router.js#L38
needs to get an additional {sensitive:true} param at the end.

what would be the best way to achieve this? (to be able to choose case-sensitive routing)

@mridgway
Copy link
Collaborator

Right you are. This should definitely be supported.

The line in routr that you pointed out just needs to pass options in as the third argument. These options are already propagated from new Router(routes, options). This resolves the support needed in routr.

fluxible-router will need a bit more work. I'm think we may need to create a RouteStore factory method that you could pass this (and other) option(s) to: createRouteStore(options). We would still provide the default RouteStore, but you'd be able to use createRouteStore to create one that's customized (similarly to how withStaticRoutes works).

@redonkulus redonkulus changed the title case-sensitive routing [fluxible-router] case-sensitive routing Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants