From 808bf1b53a36fedfd6823eab090d760138702c94 Mon Sep 17 00:00:00 2001 From: David Neal Date: Thu, 26 Feb 2026 11:17:38 -0500 Subject: [PATCH] Fix API Explorer dropping query parameters on proxied requests The /api-call proxy handler was stripping query strings from the endpoint URL before forwarding to the API server, causing pagination parameters like limit and offset to be silently ignored. The validation schema already handles stripping query params for allow-list matching, so removing them again at fetch time was both redundant and broken. Co-Authored-By: Claude Opus 4.6 --- apps/app/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/src/index.ts b/apps/app/src/index.ts index 757ad7b..813411f 100644 --- a/apps/app/src/index.ts +++ b/apps/app/src/index.ts @@ -550,10 +550,10 @@ app.post( "/api-call", express.json(), async ( req: Request, res: Response ) => try { const accessToken = tokens.access_token as string; - // Clean the endpoint by removing any query strings (handled by validation schema) - const cleanEndpoint = endpoint.split( "?" )[0].split( "#" )[0]; + // Strip fragment but preserve query string for pagination/filtering + const sanitizedEndpoint = endpoint.split( "#" )[0]; - const apiResponse = await fetch( `${ API_BASE_URL }${ cleanEndpoint }`, { + const apiResponse = await fetch( `${ API_BASE_URL }${ sanitizedEndpoint }`, { method, headers: { Authorization: `Bearer ${ accessToken }`,