x-forwarded-fetch

JSON →
library 0.2.0 ·javascript
verified Jun 7, 2026

A small middleware for fetch() that adjusts request URLs based on X-Forwarded-Host and X-Forwarded-Proto headers when running behind a reverse proxy. Version 0.2.0, stable. Key differentiator: lightweight, zero-dependency, works across Deno, Bun, and Node.js (uses @hono/node-server). Handles proxy-aware URL reconstruction without modifying existing fetch handlers.