fastify / fastify/fastify-reply-from
Async getUpstream
Open
- Dominant language
- JavaScript
- Stars
- 166
- Forks
- 103
- Avg merge
- 4h 9m
- Merged PRs (30d)
- 4
Description
### Prerequisites
- [x] I have written a descriptive issue title
- [x] I have searched existing issues to ensure the feature has not already been requested
### 🚀 Feature Proposal
The `getUpstream` callback can be sync or async.
### Motivation
We have a (probably unusual) need for `getUpstream` to support async. We have a sophisticated tenancy strategy that requires us to reach out to dbs/caches/etc to resolve the correct upstream.
### Example
```
reply.from(/some/path', {
getUpstream: async () => { return await someAsyncFunc() }
}
```
Contributor guide
Assessment
This issue has not been assessed yet.