Skip to content

feat: support async getUpstream callback - #504

Closed
hoanle0126 wants to merge 1 commit into
fastify:mainfrom
hoanle0126:feat/async-get-upstream
Closed

hoanle0126 wants to merge 1 commit into
fastify:mainfrom
hoanle0126:feat/async-get-upstream

Conversation

@hoanle0126

Copy link
Copy Markdown

Checklist

Description

Fixes #408

  • Supports both synchronous and asynchronous (Promise / thenable) getUpstream(request, base) callbacks.
  • Preserves the synchronous fast path (typeof dest?.then === 'function') so synchronous getUpstream callbacks incur no Promise allocation overhead.
  • Forwards rejected promises from async getUpstream callbacks to onError.

@hoanle0126 hoanle0126 closed this by deleting the head repository Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Async getUpstream

1 participant