## Index

### Interfaces

- ProxyOptions

### Functions

- proxy

## Functions

### proxy

- proxy(origin: string | URL, options?: ProxyOptions): FetchFunction

- - Defined in fly/fetch/proxy.ts:43

  This generates a `fetch` like function for proxying requests to a given origin. When this function makes origin requests, it adds standard proxy headers like `X-Forwarded-Host` and `X-Forwarded-For`. It also passes headers from the original request to the origin.

  #### Parameters

  - ##### origin: string | URL

    A URL to an origin, can include a path to rebase requests.

  - ##### Optional options: ProxyOptions

    Options and headers to control origin request.

  #### Returns FetchFunction

Generated using TypeDoc