Skip to content

Commit cb94415

Browse files
authored
Merge pull request #1077 from narengogi/fix/proxy-fix
do not invoke getEndpoint() when proxy route
2 parents 4d91fa1 + 27a6115 commit cb94415

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/handlers/handlerUtils.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,17 @@ export async function tryPost(
322322
c,
323323
gatewayRequestURL: c.req.url,
324324
}));
325-
const endpoint = apiConfig.getEndpoint({
326-
c,
327-
providerOptions: providerOption,
328-
fn,
329-
gatewayRequestBodyJSON: params,
330-
gatewayRequestBody: requestBody,
331-
gatewayRequestURL: c.req.url,
332-
});
325+
const endpoint =
326+
fn === 'proxy'
327+
? ''
328+
: apiConfig.getEndpoint({
329+
c,
330+
providerOptions: providerOption,
331+
fn,
332+
gatewayRequestBodyJSON: params,
333+
gatewayRequestBody: {}, // not using anywhere.
334+
gatewayRequestURL: c.req.url,
335+
});
333336

334337
url =
335338
fn === 'proxy'

0 commit comments

Comments
 (0)