Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }`,
Expand Down