We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1d6b29 commit 06d79feCopy full SHA for 06d79fe
src/index.ts
@@ -85,14 +85,8 @@ const httpProxyMiddleware = async (
85
proxyReq.end();
86
}
87
}) as any)
88
- .once("proxyRes", ((proxyRes: any) => {
89
- proxy.removeAllListeners();
90
- return resolve(proxyRes)
91
- }) as any)
92
- .once("error", ((err: any) => {
93
94
- return reject(err);
95
+ .once("proxyRes", resolve as any)
+ .once("error", reject)
96
.web(req, res, {
97
changeOrigin: true,
98
...serverOptions
0 commit comments