-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Hello,
Because proxyReqWs event is fired by event emitter [code], it does not support any async handling by returning a promise.
When someone tries to provide an async function handler that modifies headers, it results by an exception that the headers are modified AFTER the response has been sent.
Its big brother, proxyReq, has no such problem.
Is there any workaround or suggested way to make a modification that involves async operation?
if not, I would suggest such a feature.. even though it might require changing how the mechanism works (top of my head: optional parameters such as "next" + configuration to hint its async somehow).
Moreover, I would suggest to explicitly document the fact that an async handler is not allowed.
Metadata
Metadata
Assignees
Labels
No labels