Closed proc07 closed 1 year ago
I see you have v2.0.6 installed.
Plugins are available in the beta version of v3.
You can install it with:
npm install http-proxy-middleware@beta
or
yarn add http-proxy-middleware@beta
start [HPM] Missing "target" option. Example: {target: "http://www.example.org"}
http-proxy-middleware@beta i've already set it up target: 'http://jsonplaceholder.typicode.com', @chimurai
I see you have v2.0.6 installed.
Plugins are available in the beta version of v3.
You can install it with:
npm install http-proxy-middleware@beta or yarn add http-proxy-middleware@beta
i used 2.0.6 and 0.20.0 version ,delete plugin code,but following code is not executed either, printing log
on: {
proxyRes: (proxyRes, req, res) => {
console.log(proxyRes.headers["content-encoding"])
},
}
proxyRes: (proxyRes, req, res) => {
console.log(proxyRes.headers["content-encoding"])
},
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
I can make a proxy request, but I can't execute my plug-in.
consle.log can output start without using the createProxyMiddleware function
otherwise,Used, no output
Step-by-step reproduction instructions
Expected behavior (be clear and concise)
Can execute: console.log('start') console.log(proxyRes.headers["content-encoding"]) and my plunin
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
Additional context (optional)
No response