Skip to content

Commit

Permalink
Remove done() in proxy preHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed Jul 8, 2024
1 parent 33faa0a commit f12c471
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/plugins/api-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const apiProxyPlugin = fastifyPlugin<ApiProxyPluginOptions>(
cacheURLs: 10_000,
websocket: true,
proxyPayloads: true,
preHandler: async (req, reply, done) => {
preHandler: async (req, reply) => {
log.info({
msg: `Proxy request (${appName}) ${req.method} ${req.url}`,
tab_id: req.tabId,
Expand All @@ -79,7 +79,6 @@ export const apiProxyPlugin = fastifyPlugin<ApiProxyPluginOptions>(
});
req.proxyStartTime = performance.now();
await req.ensureOboAccessToken(appName, reply);
done();
},
retryMethods: ['GET'], // Only retry GET requests. All others are not idempotent.
replyOptions: {
Expand Down

0 comments on commit f12c471

Please sign in to comment.