From 9d3c35b09d2dd63ab0b696f9a0a62348b9244f8c Mon Sep 17 00:00:00 2001 From: Savas Vedova Date: Mon, 25 Mar 2024 10:03:35 +0300 Subject: [PATCH] chore: escape question mark --- src/utils/callbacks/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/callbacks/api.ts b/src/utils/callbacks/api.ts index 8accfec..c0d18e9 100644 --- a/src/utils/callbacks/api.ts +++ b/src/utils/callbacks/api.ts @@ -60,7 +60,7 @@ export const handleApi = ( // This is what we do here: // /api/my-path?query-param => /my-path const requestPath = - req.url?.split(/[?#]/)[0].split("/").slice(2).join("/") || "/"; + req.url?.split(/[\?#]/)[0].split("/").slice(2).join("/") || "/"; const file = matchPath(cachedFiles, requestPath, req.method);