Skip to content

Commit 90409da

Browse files
authored
chore(package.json): v4.0.0-beta.1 (#1187)
1 parent 219803e commit 90409da

3 files changed

Lines changed: 28 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
- fix(types): fix Logger type
66
- fix(error-response-plugin): sanitize input
77
- feat: drop node v14/v16/v18 [BREAKING CHANGE]
8-
- refactor(#1136): replace http-proxy w/ httpxy
8+
- refactor: replace http-proxy w/ httpxy
99
- chore: remove legacyCreateProxyMiddleware() [BREAKING CHANGE]
1010
- ci: migrate from jest to vitest
1111
- chore(package.json): esm only [BREAKING CHANGE]
12+
- chore(package.json): bump to httpxy 0.5.0 (#1183)
13+
- chore(package.json): drop node20 [BREAKING CHANGE] (#1179)
14+
- refactor: remove deprecated url.parse() (#1176)
15+
- fix(fixRequestBody): support content-encoding on request body (#1142)
16+
- fix: prevent TypeError when ws enabled but server is undefined (#1163)
17+
- fix: applyPathRewrite logs old req.url instead of rewritten path (#1157)
1218

1319
## [v3.0.5](https://github.com/chimurai/http-proxy-middleware/releases/tag/v3.0.5)
1420

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77

88
Node.js proxying made simple. Configure proxy middleware with ease for [connect](https://github.com/senchalabs/connect), [express](https://github.com/expressjs/express), [next.js](https://github.com/vercel/next.js) and [many more](#compatible-servers).
99

10-
Powered by the popular Nodejitsu [`http-proxy`](https://github.com/http-party/node-http-proxy). [![GitHub stars](https://img.shields.io/github/stars/http-party/node-http-proxy.svg?style=social&label=Star)](https://github.com/http-party/node-http-proxy)
10+
Powered by [`httpxy`](https://github.com/unjs/httpxy). A maintained version of [http-proxy](https://github.com/http-party/node-http-proxy).
1111

1212
## ⚠️ Note <!-- omit in toc -->
1313

14-
This page is showing documentation for version v3.x.x ([release notes](https://github.com/chimurai/http-proxy-middleware/releases))
14+
This page is showing documentation for version **v4.x.x** ([release notes](https://github.com/chimurai/http-proxy-middleware/releases))
1515

16-
See [MIGRATION.md](https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md) for details on how to migrate from v2.x.x to v3.x.x
16+
For older documentation:
1717

18-
If you're looking for older documentation. Go to:
19-
20-
- <https://github.com/chimurai/http-proxy-middleware/tree/v2.0.4#readme>
21-
- <https://github.com/chimurai/http-proxy-middleware/tree/v0.21.0#readme>
18+
- [v3.0.5](https://github.com/chimurai/http-proxy-middleware/tree/v3.0.5#readme)
19+
- [v2.0.4](https://github.com/chimurai/http-proxy-middleware/tree/v2.0.4#readme)
20+
- [v0.21.0](https://github.com/chimurai/http-proxy-middleware/tree/v0.21.0#readme)
2221

2322
## TL;DR <!-- omit in toc -->
2423

@@ -48,7 +47,7 @@ app.listen(3000);
4847
// http://127.0.0.1:3000/api/foo/bar -> http://www.example.org/api/foo/bar
4948
```
5049

51-
_All_ `http-proxy` [options](https://github.com/nodejitsu/node-http-proxy#options) can be used, along with some extra `http-proxy-middleware` [options](#options).
50+
_All_ `httpxy` [options](https://github.com/unjs/httpxy#options) can be used, along with some extra `http-proxy-middleware` [options](#options).
5251

5352
## Table of Contents <!-- omit in toc -->
5453

@@ -65,8 +64,8 @@ _All_ `http-proxy` [options](https://github.com/nodejitsu/node-http-proxy#option
6564
- [`plugins` (Array)](#plugins-array)
6665
- [`ejectPlugins` (boolean) default: `false`](#ejectplugins-boolean-default-false)
6766
- [`logger` (Object)](#logger-object)
68-
- [`http-proxy` events](#http-proxy-events)
69-
- [`http-proxy` options](#http-proxy-options)
67+
- [`httpxy` events](#httpxy-events)
68+
- [`httpxy` options](#httpxy-options)
7069
- [WebSocket](#websocket)
7170
- [External WebSocket upgrade](#external-websocket-upgrade)
7271
- [Intercept and manipulate requests](#intercept-and-manipulate-requests)
@@ -315,9 +314,9 @@ createProxyMiddleware({
315314
});
316315
```
317316

318-
## `http-proxy` events
317+
## `httpxy` events
319318

320-
Subscribe to [http-proxy events](https://github.com/nodejitsu/node-http-proxy#listening-for-proxy-events) with the `on` option:
319+
Subscribe to [httpxy events](https://github.com/unjs/httpxy#events) with the `on` option:
321320

322321
```js
323322
createProxyMiddleware({
@@ -356,7 +355,7 @@ createProxyMiddleware({
356355
}
357356
```
358357

359-
- **option.on.proxyReq**: function, subscribe to http-proxy's `proxyReq` event.
358+
- **option.on.proxyReq**: function, subscribe to httpxy's `proxyReq` event.
360359

361360
```javascript
362361
function onProxyReq(proxyReq, req, res) {
@@ -366,7 +365,7 @@ createProxyMiddleware({
366365
}
367366
```
368367

369-
- **option.on.proxyReqWs**: function, subscribe to http-proxy's `proxyReqWs` event.
368+
- **option.on.proxyReqWs**: function, subscribe to httpxy's `proxyReqWs` event.
370369

371370
```javascript
372371
function onProxyReqWs(proxyReq, req, socket, options, head) {
@@ -375,7 +374,7 @@ createProxyMiddleware({
375374
}
376375
```
377376

378-
- **option.on.open**: function, subscribe to http-proxy's `open` event.
377+
- **option.on.open**: function, subscribe to httpxy's `open` event.
379378

380379
```javascript
381380
function onOpen(proxySocket) {
@@ -384,7 +383,7 @@ createProxyMiddleware({
384383
}
385384
```
386385

387-
- **option.on.close**: function, subscribe to http-proxy's `close` event.
386+
- **option.on.close**: function, subscribe to httpxy's `close` event.
388387

389388
```javascript
390389
function onClose(res, socket, head) {
@@ -393,9 +392,9 @@ createProxyMiddleware({
393392
}
394393
```
395394

396-
## `http-proxy` options
395+
## `httpxy` options
397396

398-
The following options are provided by the underlying [http-proxy](https://github.com/nodejitsu/node-http-proxy#options) library.
397+
The following options are provided by the underlying [httpxy](https://github.com/unjs/httpxy#options) library.
399398

400399
- **option.target**: url string to be parsed with the url module
401400
- **option.forward**: url string to be parsed with the url module
@@ -450,10 +449,10 @@ The following options are provided by the underlying [http-proxy](https://github
450449
- **option.buffer**: stream of data to send as the request body. Maybe you have some middleware that consumes the request stream before proxying it on e.g. If you read the body of a request into a field called 'req.rawbody' you could restream this field in the buffer option:
451450
452451
```javascript
453-
import httpProxy from 'http-proxy';
452+
import { createProxyServer } from 'httpxy';
454453
import streamify from 'stream-array';
455454
456-
const proxy = httpProxy.createProxyServer();
455+
const proxy = createProxyServer();
457456
458457
export default function proxyWithBody(req, res, next) {
459458
proxy.web(
@@ -638,4 +637,4 @@ $ yarn spellcheck
638637

639638
The MIT License (MIT)
640639

641-
Copyright (c) 2015-2025 Steven Chim
640+
Copyright (c) 2015-2026 Steven Chim

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "http-proxy-middleware",
33
"type": "module",
4-
"version": "4.0.0-beta.0",
4+
"version": "4.0.0-beta.1",
55
"description": "The one-liner node.js proxy middleware for connect, express, next.js and more",
66
"main": "dist/index.js",
77
"exports": {

0 commit comments

Comments
 (0)