npm / http-proxy-middleware
http-proxy-middleware
What changed in http-proxy-middleware 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
3 breaking3 security8 new APIs and options1 performance3 behavior and defaults9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inithttp-proxy-middleware 425 changes
Breaking changes 3
The package now ships as native ES modules only; CommonJS require() usage is no longer supported.
The legacy compatibility wrapper was removed; use createProxyMiddleware() directly.
The minimum supported runtime is now Node.js 22.15.0; support for Node.js 14, 16, 18, and 20 was dropped.
Security 3
Hardens form-data stringification in fixRequestBody.
Hardened proxy-table matching to prevent routing bypass.
Sanitized input in the error response plugin.
New APIs and options 8
Exports the OnProxyEvent type for use in TypeScript.
Adds a diagnostic message for POST requests with bodyParser that encounter an ECONNRESET error.
A helper function to create plugins is now available.
Custom pathRewrite functions now receive res and options.
The router function now receives res and options.
zstd compression is supported in responseInterceptor and fixRequestBody.
An experimental proxy middleware API was added for Hono apps.
A dedicated subpath import was added for Hono support.
Performance 1
Response interception reduces buffer churn.
Behavior and default changes 3
The forward option now supports literal IPv6 URLs, such as http://[::1]:3000.
The proxy implementation switched from http-proxy to httpxy, bringing upstream fixes, HTTP/2 support, and performance improvements.
The target option now supports literal IPv6 URLs, such as http://[::1]:3000.
Fixes and other changes 7
The Filter callback return type was widened.
Prevents trailer and content-length conflicts.
Handles bodyless responses (HEAD/1xx/204/304) with content-encoding.
WebSocket handling now supports multi-server upgrade subscriptions and safe proxy shutdown.
Request body handling now supports text/plain content and content-encoding.
The proxyRes callback type now allows a Promise<void> return type.
Prevents a TypeError when WebSocket proxying is enabled but the server is undefined.
http-proxy-middleware 32 changes
Fixes and other changes 2
Added support for text/plain request bodies.
Fixed the Logger type.