From 3d08252e2c219c74844535b550e785b1712f6967 Mon Sep 17 00:00:00 2001 From: Jeremy Weinstein Date: Wed, 13 Sep 2023 22:02:55 -0700 Subject: [PATCH] fix: use case insensitive matching --- src/trie.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trie.ts b/src/trie.ts index 68c27b4..0cd2427 100644 --- a/src/trie.ts +++ b/src/trie.ts @@ -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(); } /**