http-proxy-middleware breaking changes
Updated December 4, 2026
On this page
Latest version 4.2.2, released November 15, 2026. Source repository
Its 4.0.0 release drops Node.js 14, 16, 18 and 20. Node.js end of life dates.
- From 3.0.6 to 4.2.1: 27 breaking changes in 4 versions.
- From 2.0.8 to 4.2.1: 49 breaking changes in 11 versions.
http-proxy-middleware 4.2.1 breaking changes
- Signature changed
createProxyMiddleware
Was function createProxyMiddleware<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext>... npmjs.com - Signature changed
OnProxyEvent.close
Was close?: (proxyRes: TReq, proxySocket: net.Socket, proxyHead: any) => void; now close?: (proxyRes: TReq, proxySocket: net.Socket, proxyHead: Buffer) => void. npmjs.com - Signature changed
OnProxyEvent.econnreset
Was econnreset?: (err: Error, req: TReq, res: TRes, target: string | Partial<URL>) => void; now econnreset?: (err: Error, req: TReq, res: TRes, target: ProxyTarget) => void. npmjs.com - Signature changed
OnProxyEvent.error
Was error?: (err: Error, req: TReq, res: TRes | net.Socket, target?: string | Partial<URL>) => void; now error?: (err: Error, req: TReq, res: TRes | net.Socket, target?: ProxyTarget) => void. npmjs.com - Signature changed
OnProxyEvent.proxyReqWs
Was proxyReqWs?: (proxyReq: http.ClientRequest, req: TReq, socket: net.Socket, options: ProxyServerOptions, head: any) => void; now proxyReqWs?: (proxyReq: http.ClientRequest, req: TReq, socket: net.Socket, options: ProxyServerOptions... npmjs.com - Signature changed
OnProxyEvent.start
Was start?: (req: TReq, res: TRes, target: string | Partial<URL>) => void; now start?: (req: TReq, res: TRes, target: ProxyTarget) => void. npmjs.com - Signature changed
Options.router
Was router?: Record<string, ProxyServerOptions['target']> | ((req: TReq, res: TRes | undefined, options: Options<TReq, TRes>) => ProxyServerOptions['target']) | ((req: TReq, res: TRes | undefined, options: Options<TReq, TRes>) =>... npmjs.com
http-proxy-middleware 4.1.0 breaking changes
- Signature changed
Filter
Was type Filter<TReq extends http.IncomingMessage = http.IncomingMessage> = string | string[] | ((pathname: string, req: TReq) => boolean); now type Filter<TReq extends http.IncomingMessage = http.IncomingMessage> = string | string[] |... npmjs.com - Signature changed
Options.pathRewrite
Was pathRewrite?: PathRewriteConfig<TReq>; now pathRewrite?: PathRewriteConfig<TReq, TRes>. npmjs.com - Signature changed
Options.router
Was router?: Record<string, ProxyServerOptions['target']> | ((req: TReq) => ProxyServerOptions['target']) | ((req: TReq) => Promise<ProxyServerOptions['target']>); now router?: Record<string, ProxyServerOptions['target']> | ((req: TReq... npmjs.com
http-proxy-middleware 4.0.0 breaking changes
- Removed
The minimum supported Node.js version is now 22.15.0. Older Node.js versions need to be upgraded. github.com - Removed
Switch imports to ESM syntax, since require() no longer works. github.com - Removed
legacyCreateProxyMiddleware
The legacy compatibility wrapper is gone. Call createProxyMiddleware() directly. npmjs.com - Removed
LegacyOptions
LegacyOptions was removed in http-proxy-middleware 4.0.0 npmjs.com - Behavior changed
CommonJS require() is no longer supported. Change imports to ESM syntax. github.com - Behavior changed
The core proxy dependency is replaced, so proxying behavior may differ in edge cases. github.com - Signature changed
createProxyMiddleware
Was function createProxyMiddleware<TReq = http.IncomingMessage, TRes = http.ServerResponse, TNext = NextFunction>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext>; now function createProxyMiddleware<TReq extends... npmjs.com - Signature changed
Filter
Was type Filter<TReq = http.IncomingMessage> = string | string[] | ((pathname: string, req: TReq) => boolean); now type Filter<TReq extends http.IncomingMessage = http.IncomingMessage> = string | string[] | ((pathname: string, req: TReq)... npmjs.com - Signature changed
Options
Was interface Options<TReq = http.IncomingMessage, TRes = http.ServerResponse> extends httpProxy.ServerOptions; now interface Options<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse =... npmjs.com - Signature changed
Options.pathRewrite
Was pathRewrite?: {[regexp: string]: string;} | ((path: string, req: TReq) => string | undefined) | ((path: string, req: TReq) => Promise<string>); now pathRewrite?: PathRewriteConfig<TReq>. npmjs.com
And 6 more in this version. Sign up to see every change
http-proxy-middleware 4.0.0-beta.0 breaking changes
- Removed
req.connection
Code that reads req.connection on proxied requests must use another property. github.com
http-proxy-middleware 3.0.6 breaking changes
- Signature changed
Options.logger
Was logger?: Logger | any; now logger?: Logger. npmjs.com
http-proxy-middleware 3.0.5 breaking changes
- Signature changed
fixRequestBody
Was function fixRequestBody<TReq extends BodyParserLikeRequest = BodyParserLikeRequest>(proxyReq: http.ClientRequest, req: TReq, res: http.ServerResponse<http.IncomingMessage>, options: Options): void; now function fixRequestBody<TReq... npmjs.com
Older versions
6 older versions, each with its first changes. Sign up to see every change
Show 6 older versions
http-proxy-middleware 3.0.4 breaking changes
- Signature changed
fixRequestBody
Was function fixRequestBody<TReq = http.IncomingMessage>(proxyReq: http.ClientRequest, req: TReq): void; now function fixRequestBody<TReq extends BodyParserLikeRequest = BodyParserLikeRequest>(proxyReq: http.ClientRequest, req: TReq, res... npmjs.com
http-proxy-middleware 3.0.1 breaking changes
- Signature changed
RequestHandler.__call
Was (req: TReq, res: TRes, next?: TNext): void | Promise<void>; now (req: TReq, res: TRes, next?: TNext): Promise<void>. npmjs.com
http-proxy-middleware 3.0.0 breaking changes
- Removed
Node.js 12 is no longer supported; upgrade Node.js before using this version. github.com - Signature changed
createProxyMiddleware
Was function createProxyMiddleware(context: Filter | Options, options?: Options): import("./types").RequestHandler; now function createProxyMiddleware<TReq = http.IncomingMessage, TRes = http.ServerResponse, TNext = NextFunction>(options... npmjs.com
And 8 more in this version.
http-proxy-middleware 3.0.0-beta.0 breaking changes
- Removed
Shorthand usage of the proxy middleware is no longer supported; use the full API form instead. github.com - Renamed
context
The context option is replaced by pathFilter; code using context must switch to pathFilter. github.com
And 5 more in this version.
http-proxy-middleware 2.0.9 breaking changes
- Signature changed
fixRequestBody
Was function fixRequestBody(proxyReq: http.ClientRequest, req: http.IncomingMessage, res: http.ServerResponse): void; now function fixRequestBody(proxyReq: http.ClientRequest, req: http.IncomingMessage): void. npmjs.com
http-proxy-middleware 2.0.8 breaking changes
- Signature changed
fixRequestBody
Was function fixRequestBody(proxyReq: http.ClientRequest, req: http.IncomingMessage): void; now function fixRequestBody(proxyReq: http.ClientRequest, req: http.IncomingMessage, res: http.ServerResponse): void. npmjs.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.