Skip to content

Commit

Permalink
fix: use case insensitive matching
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Sep 14, 2023
1 parent 273f339 commit 3d08252
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ export class RouteTrie {
*/
private normalizePath(path: string) {
// Remove leading slashes.
return path.replace(/^\/+/g, '');
// Convert to lowercase for case insensitive matching.
return path.replace(/^\/+/g, '').toLocaleLowerCase();
}

/**
Expand Down

0 comments on commit 3d08252

Please sign in to comment.