I want to dynamically change target for proxy, router options as a function seems to be a good choice, but it's a sync function returns a target string.
Is there a way to do the async router function, something like this
async function asyncRouterFunc(req) {
const target = await getNewTargetBasedOnReq(req);
return target;
}
Just merged this in PR #379
I released a beta version:
npm install [email protected]
Let me know if you run into issues.
@chimurai it works like a charm. Thanks!
published: [email protected] with async router support
Most helpful comment
Just merged this in PR #379
I released a beta version:
npm install [email protected]Let me know if you run into issues.