Options for `proxy`.

### Hierarchy

- ProxyOptions

## Index

### Properties

- forwardHostHeader
- headers
- stripPath

## Properties

### Optional forwardHostHeader

forwardHostHeader: boolean

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

Forward `Host` header from original request. Without this options, proxy requests infers a host header from the origin URL. Defaults to `false`.

### Optional headers

headers: object

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

Headers to set on backend request. Each header accepts either a `boolean` or `string`.

- If set to `false`, strip header entirely before sending.
- `true` or `undefined` send the header through unmodified from the original request.
- `string` header values are sent as is

#### Type declaration

- ##### [key: string]: string | boolean | undefined

### Optional stripPath

stripPath: string

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

Replace this portion of URL path before making request to origin.

For example, this makes a request to `https://fly.io/path1/to/document.html`:

    const opts = { stripPath: "/path2/"}
    const origin = proxy("https://fly.io/path1/", opts)
    origin("https://somehostname.com/path2/to/document.html")

Generated using TypeDoc