# chimurai/http-proxy-middleware

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/chimurai-http-proxy-middleware).**

11,132 stars · 880 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/chimurai/http-proxy-middleware
- awesome-repositories: https://awesome-repositories.com/repository/chimurai-http-proxy-middleware.md

## Description

This project is a Node.js HTTP reverse proxy middleware designed to route incoming HTTP and WebSocket traffic to target backend services. It functions as a dynamic routing engine and API gateway tool, providing the capability to consolidate multiple backend services behind a single entry point.

The middleware features a WebSocket proxy bridge that manages protocol upgrade handshakes to maintain persistent bidirectional communication. It also includes a request and response transformer used to intercept and modify headers, bodies, and URL paths during transit.

The system provides broad traffic management capabilities, including request filtering via glob matching and path patterns, as well as dynamic request routing. It supports detailed data transformation through path rewriting, cookie attribute adjustment, and request or response body modification.

The project is written in TypeScript.

## Tags

### Networking & Communication

- [HTTP Request Forwarders](https://awesome-repositories.com/f/networking-communication/http-proxies/proxy-request-routers/http-request-forwarders.md) — Forwards incoming HTTP requests to target backend servers while maintaining headers and body content. ([source](https://github.com/chimurai/http-proxy-middleware#readme))
- [HTTP Reverse Proxies](https://awesome-repositories.com/f/networking-communication/http-reverse-proxies.md) — Provides a central entry point for Node.js applications to route incoming network traffic to backend microservices.
- [API Gateways](https://awesome-repositories.com/f/networking-communication/api-gateways.md) — Consolidates multiple backend services behind a single interface to manage traffic distribution and request path rewriting.
- [Connection Forwarders](https://awesome-repositories.com/f/networking-communication/connection-management/websocket-connection-managers/connection-forwarders.md) — Manages persistent bidirectional WebSocket communication by routing protocol upgrade handshakes to backend servers. ([source](https://github.com/chimurai/http-proxy-middleware#readme))
- [WebSocket Protocol Upgrades](https://awesome-repositories.com/f/networking-communication/http-2-and-websocket-servers/websocket-protocol-upgrades.md) — Manages HTTP upgrade handshakes to transparently forward persistent WebSocket connections to backend servers.
- [Request Filters](https://awesome-repositories.com/f/networking-communication/http-proxies/proxy-request-routers/request-filters.md) — Uses path patterns and glob matching to determine which incoming requests are forwarded to the target. ([source](https://github.com/chimurai/http-proxy-middleware#readme))
- [HTTP Request Routing](https://awesome-repositories.com/f/networking-communication/http-request-dispatching/http-request-routing.md) — Implements a routing engine to direct network requests to different target servers using path patterns and glob matching.
- [Request Routing](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-routing-traffic-management/request-routing.md) — Directs network requests to target servers at runtime using path matching and asynchronous logic.
- [Node.js Proxy Servers](https://awesome-repositories.com/f/networking-communication/node-js-proxy-servers.md) — Implements a Node.js-based proxy server for routing HTTP and WebSocket traffic with customizable transformations.
- [Traffic Routing](https://awesome-repositories.com/f/networking-communication/traffic-routing.md) — Directs network requests to multiple backend targets based on path patterns, glob matching, or custom logic.
- [Header Rewriters](https://awesome-repositories.com/f/networking-communication/http-clients/host-header-rewriting/payload-rewriters/header-rewriters.md) — Intercepts and modifies response headers to change location hostnames, protocols, or cookie domains. ([source](https://github.com/chimurai/http-proxy-middleware#readme))
- [Proxy Configurations](https://awesome-repositories.com/f/networking-communication/proxy-configurations.md) — Provides adjustable settings for SSL verification, timeout thresholds, and header manipulation. ([source](https://github.com/chimurai/http-proxy-middleware#readme))
- [Proxy Scripting Extensions](https://awesome-repositories.com/f/networking-communication/proxy-scripting-extensions.md) — Offers a plugin system and event subscription mechanism for adding custom logic to the proxy pipeline. ([source](https://github.com/chimurai/http-proxy-middleware#readme))
- [Request Header Configuration](https://awesome-repositories.com/f/networking-communication/request-header-configuration.md) — Injects or updates HTTP request headers on outgoing calls to ensure correct routing and connectivity. ([source](https://github.com/chimurai/http-proxy-middleware/tree/v0.21.0))

### System Administration & Monitoring

- [WebSocket and Protocol Proxying](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/proxy-management-systems/multi-protocol-proxy-managers/multi-protocol-proxies/websocket-and-protocol-proxying.md) — Handles protocol upgrade handshakes to maintain persistent bidirectional WebSocket communication between clients and servers.

### Web Development

- [Request and Response Transformers](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/request-and-response-transformers.md) — Provides a configurable layer to inject, remove, or rewrite request and response headers and bodies during transit.
- [Dynamic Target Selection](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/routing-request-handling/http-request-handlers/path-based-handler-routings/dynamic-target-selection.md) — Determines the target backend server at runtime by evaluating incoming request paths against patterns or asynchronous logic.
- [WebSocket Traffic Routers](https://awesome-repositories.com/f/web-development/real-time-web-architectures/websocket-backends/websocket-traffic-routers.md) — Manages persistent bidirectional communication by forwarding real-time WebSocket upgrade handshakes and data streams.
- [Request Interception Middleware](https://awesome-repositories.com/f/web-development/request-interception-middleware.md) — Integrates into the server request pipeline to intercept and modify network traffic before it reaches the backend.
- [Body Manipulators](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-response-handling/response-streaming/response-body-buffering-control/body-manipulators.md) — Provides interfaces to intercept and modify the content of HTTP response bodies using raw data buffers.
- [Development Proxies](https://awesome-repositories.com/f/web-development/development-proxies.md) — Bypasses CORS restrictions by forwarding local frontend requests to remote backend APIs during development.
- [API Gateway Utilities](https://awesome-repositories.com/f/web-development/node-js-backend-services/api-gateway-utilities.md) — Acts as a utility for consolidating multiple backend services behind a single entry point to bypass CORS.

### Development Tools & Productivity

- [Request Path Rewriters](https://awesome-repositories.com/f/development-tools-productivity/path-managers/path-modifiers/request-path-rewriters.md) — Transforms outgoing request URLs and incoming redirect headers using regular expressions to align environment paths.
- [HTTP Stream Piping](https://awesome-repositories.com/f/development-tools-productivity/stream-piping-utilities/http-stream-piping.md) — Routes incoming network data directly to target servers using streams to maintain low memory usage.

### Security & Cryptography

- [Cookie and Redirect Rewriting](https://awesome-repositories.com/f/security-cryptography/cookie-security/cookie-and-redirect-rewriting.md) — Adjusts domain and path settings within set-cookie headers to maintain routing consistency in proxied environments. ([source](https://github.com/chimurai/http-proxy-middleware/tree/v3.0.5))

### Software Engineering & Architecture

- [Proxy Lifecycle Hooks](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-hooks/proxy-lifecycle-hooks.md) — Exposes internal proxy stages as a subscription system to execute custom logic during the request-response lifecycle.

### Part of an Awesome List

- [HTTP Clients](https://awesome-repositories.com/f/awesome-lists/devtools/http-clients.md) — Proxy middleware for Express and Connect.
