Skip to main content
The Proxy Helper provides functionality to proxy requests to backend servers with automatic header handling.

Import

Functions

proxy()

Proxy a request to a backend server.
string | URL
required
The target URL to proxy to
ProxyOptions
Optional proxy configuration
Response | Promise<Response>
The proxied response
Example

Options

typeof fetch
Custom fetch implementation

Advanced Usage

Security Features

  • Automatically removes hop-by-hop headers
  • Prevents Connection header injection
  • Handles encoding properly
  • Preserves request body and method