http-proxy-middleware icon indicating copy to clipboard operation
http-proxy-middleware copied to clipboard

feat(http-proxy-3): migrate from http-proxy to http-proxy-3

Open muhsinkamil opened this issue 4 months ago • 4 comments

Describe the feature you'd love to see

The node-http-proxy project https://github.com/http-party/node-http-proxy/issues/1588 has no releases for 5 years now. There are currently 510 issues and 108 open PRs including several security related ones.

node-http-proxy also uses outdated follow-redirects that has vulnerabilities. Vite has already switched to http-proxy-3 to address similar problems: https://github.com/vitejs/vite/pull/20402

Additional context (optional)

No response

muhsinkamil avatar Aug 15 '25 14:08 muhsinkamil

Good to see progress in a maintained fork of http-proxy.

http-proxy-3 is also mentioned here: https://github.com/chimurai/http-proxy-middleware/issues/1017#issuecomment-3190896016

Currently http-proxy-3 lacks support for TypeScript Generics, so it can provide proper types for different servers, e.g. (http, connect, express and more: https://github.com/chimurai/http-proxy-middleware#compatible-servers)

Until generics from @types/http-proxy are supported/ported, it'll be a blocker to migrate to http-proxy-3

chimurai avatar Aug 21 '25 17:08 chimurai

@chimurai Unfortunately, yes, types is becoming a problem for this migration. I tried to migrate it myself for this project. However, have to use many 'any' along the way

muhsinkamil avatar Aug 21 '25 17:08 muhsinkamil

Migration is blocked until TypeScript Generics are implemented: https://github.com/sagemathinc/http-proxy-3/issues/19

chimurai avatar Aug 21 '25 21:08 chimurai

Typescript Generics are implemented. :-)

williamstein avatar Aug 30 '25 01:08 williamstein