---
title: "createFetchProxy"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/fetch-proxy/src/lib/fetch-proxy.ts#L87"
---

# createFetchProxy

## Summary

Creates a `fetch` function that forwards requests to another server.

Removes connection-specific request headers and incoming `Content-Length` so the outgoing
fetch can determine framing for the forwarded body.

## Signature

```ts
function createFetchProxy(target: string | URL, options: FetchProxyOptions): FetchProxy

```

## Parameters

### `target`

The URL of the server to proxy requests to

### `options`

Options to customize the behavior of the proxy

## Returns

A fetch function that forwards requests to the target server