This package, `koa-http-proxy`, is an extremely early-stage Koa middleware designed to proxy HTTP requests, wrapping the `nodejitsu/node-http-proxy` library. It is currently at version 0.0.1 and was last published approximately 9 years ago, indicating it is effectively abandoned and unmaintained. Due to its age, it is highly unlikely to be compatible with modern Koa (v2.x or v3.x) and recent Node.js versions (v12+ or v18+ required by Koa 2.x/3.x respectively). Its key differentiator was its direct integration with Koa, but it lacks the features, stability, and security updates found in more actively maintained Koa proxy solutions like `koa-proxies` or `koa-better-http-proxy`. This package should not be used in new projects.
npm install koa-http-proxyVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up a basic Koa application using koa-http-proxy to proxy all incoming requests to 'https://www.google.com'.
Do not use this package. Migrate to a actively maintained Koa proxy middleware like `koa-proxies` or `koa-better-http-proxy`.
Migrate to a well-maintained and regularly updated proxy solution to ensure security patches and best practices are applied. Carefully review the configuration and ensure proper input validation.
Upgrade to a Koa proxy middleware designed for Koa 2.x/3.x `async/await` patterns. For example, `koa-proxies` or `koa-better-http-proxy`.
Consult the documentation for the specific version of `node-http-proxy` it wraps (likely very old). However, the best fix is to use a modern Koa proxy that has a more up-to-date and documented API.
Ensure your Koa application is updated to versions 2.16.4 or 3.1.2 and higher to mitigate CVE-2026-27959. Always validate `ctx.hostname` if used for security-sensitive URL construction.
This package is incompatible with modern Koa. Replace `koa-http-proxy` with a contemporary Koa proxy solution like `koa-proxies` or `koa-better-http-proxy`.
This package is not designed for modern ESM projects. Use an ESM-compatible proxy middleware for Koa, such as `@whitetrefoil/koa-http-proxy` (v2.0.0+) or `koa-proxies`.
Do not use `koa-http-proxy`. If using an alternative Koa proxy, ensure no `koa-bodyparser` or similar middleware processes the request body *before* the proxy middleware for routes being proxied. Consult the documentation of your chosen proxy middleware for correct configuration.