Skip to content

Support for case sensitive routes #5435

Closed
@apoh

Description

@apoh

Currently Route handles paths in non case sensitive way. We want to add support for case sensitive paths.

Example:

   <Route sensitive path={"/example"} />
path location.pathname sensitive matches
/one /one false true
/one /One false true
/one /one true true
/one /One true false

By default sensitive could be false to keep the behaviour downward compatible.
We believe this can be easily implement since path-to-regex has a support for this option path to regex documentation.

One of the reasons for this feature is for example to avoid duplicate content that has negative impact on search engines.

Please let us know if you have any comments about this. We are thinking make a pull request for this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions