You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[](https://github.com/sagemathinc/http-proxy-3/actions/workflows/test.yml)
4
4
5
-
**THIS IS READY TO USE IN PRODUCTION.**
5
+
**THIS IS FULLY READY TO USE IN PRODUCTION. Please use it!**
6
6
7
7
http\-proxy\-3 is a modern API compatible rewrite of
8
8
[http\-proxy](https://github.com/http-party/node-http-proxy), the original nodejs
@@ -13,15 +13,24 @@ can be done using nginx or haproxy.
13
13
14
14
**PR's welcome!**
15
15
16
-
May 11, 2025 STATUS compared to [http-proxy](https://www.npmjs.com/package/http-proxy) and [httpxy](https://www.npmjs.com/package/httpxy):
16
+
Contributors:
17
17
18
-
- Library entirely rewritten in Typescript in a modern style, with many typings added internally.
18
+
-[William](https://wstein.org/)[Stein](https://github.com/williamstein) -- lead dev; started this fork and did the initial Typescript rewrite, etc.
19
+
-[sapphi-red](https://green.sapphi.red/about) -- greatly improved Typescript support to prepare http-proxy-3 for use in [Vite](https://vite.dev/)
20
+
-[ImranR-TI](https://github.com/ImranR-TI) -- very helpful bug reports
21
+
- Everybody who ever contributed to [http-proxy](https://www.npmjs.com/package/http-proxy)
22
+
23
+
**Status:**
24
+
25
+
July 12, 2025 STATUS compared to [http-proxy](https://www.npmjs.com/package/http-proxy) and [httpxy](https://www.npmjs.com/package/httpxy):
26
+
27
+
- Library entirely rewritten in Typescript in a modern style, with many typings added internally and strict mode enabled.
19
28
- All dependent packages updated to latest versions, addressing all security vulnerabilities according to `pnpm audit`.
20
29
- Code rewritten to not use deprecated/insecure API's, e.g., using `URL` instead of `parse`.
21
-
- Fixed socket leaks in the Websocket proxy code, going beyond [http-proxy-node16](https://www.npmjs.com/package/http-proxy-node16) to also instrument and logging socket counts.
30
+
- Fixed socket leaks in the Websocket proxy code, going beyond [http-proxy-node16](https://www.npmjs.com/package/http-proxy-node16) to also instrument and logging socket counts. Also fixed an issue with uncatchable errors when using websockets.
22
31
- Switch to pnpm for development.
23
32
- More jest unit tests than both http-proxy and httpxy: converted all the http-proxy examples into working unit tests that they actually work (http-proxy's unit tests just setup the examples in many cases, but didn't test that they actually work). Also httpxy seems to have almost no tests. These tests should make contributing PR's much easier.
24
-
- Used in production on https://CoCalc.com
33
+
- Used in production on https://CoCalc.com and JupyterHub.
**Motivation:** http-proxy is one of the oldest and most famous nodejs modules, and it gets downloaded around 15 million times a week, and I've loved using it for years. Unfortunately, it is [unmaintained](https://github.com/http-party/node-http-proxy/issues/1687), it has significant leaks that [regularly crash production servers](https://github.com/jupyterhub/configurable-http-proxy/issues/434), and is written in ancient untyped Javascript. The maintainers have long since stopped responding, so there is no choice but to fork and start over. I wanted to do my part to help maintain the open source ecosystem, hence this library. I hope you find it useful.
@@ -424,7 +433,6 @@ proxyServer.listen(8015);
424
433
-**protocolRewrite**: rewrites the location protocol on \(201/301/302/307/308\) redirects to 'http' or 'https'. Default: null.
425
434
426
435
-**cookieDomainRewrite**: rewrites domain of `set-cookie` headers. Possible values:
427
-
428
436
-`false`\(default\): disable cookie rewriting
429
437
- String: new domain, for example `cookieDomainRewrite: "new.domain"`. To remove the domain, use `cookieDomainRewrite: ""`.
430
438
- Object: mapping of domains to new domains, use `"*"` to match all domains.
@@ -438,7 +446,6 @@ proxyServer.listen(8015);
438
446
```
439
447
440
448
- **cookiePathRewrite**: rewrites path of `set-cookie` headers. Possible values:
441
-
442
449
- `false` \(default\): disable cookie rewriting
443
450
- String: new path, for example `cookiePathRewrite: "/newPath/"`. To remove the path, use `cookiePathRewrite: ""`. To set path to root use `cookiePathRewrite: "/"`.
444
451
- Object: mapping of paths to new paths, use `"*"` to match all paths.
@@ -634,4 +641,3 @@ pnpm test
634
641
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
635
642
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
0 commit comments