http-forward is a minimalist Node.js library designed to proxy incoming HTTP requests to a specified target URL. It functions by attaching a `target` property to the `req.forward` object, allowing for basic request redirection within a Node.js `http.createServer` instance. This package is extremely lightweight and relies solely on Node.js's built-in `http` module. However, with its last publish date over ten years ago (version 0.1.3) and no apparent ongoing development, it is considered abandoned. It does not support modern JavaScript module syntax (ESM), HTTP/2, or contemporary security practices, and has no release cadence. Users are strongly advised to consider actively maintained and more feature-rich alternatives such as `http-proxy` or `http-proxy-middleware` for any new or existing projects requiring HTTP proxying in Node.js.
npm install http-forwardVerified import paths — ran on the pinned version, not inferred.
This example sets up a simple proxy server on port 3000 that forwards all incoming HTTP requests to a target server running on port 9000.
Migrate to a maintained HTTP proxy library such as `node-http-proxy` or `http-proxy-middleware`.
Ensure your project is configured for CommonJS, or migrate to a modern proxy library that supports ESM. Consider using a CommonJS-to-ESM wrapper if absolutely necessary, but this is not recommended for an abandoned package.
For projects requiring HTTP/2, WebSocket proxying, or advanced features, use modern, actively maintained proxy libraries or dedicated proxy servers (e.g., Nginx, HAProxy, Caddy, Traefik, or Node.js alternatives like `node-http-proxy-3`).
This package is CommonJS-only. You must use `const forward = require('http-forward');` to import it. Alternatively, configure your project to run as CommonJS or migrate to a modern proxy library that supports ESM.While specific fixes vary, common workarounds involve ensuring Node.js environment compatibility (which is hard for an ancient library) or, more reliably, migrating to a robust, actively maintained proxy solution that handles connection management more resiliently.
No dependency data recorded yet.