[]previous and next page

CreateFetchOptions

Options of createFetch.

Options of createFetch.

Import#

ts
import type { CreateFetchOptions } from "@shadow-js/dusk/server";

Signature#

ts
interface CreateFetchOptions {
  /**
   * Header the platform sets to the real client address and overwrites on the way in (for example
   * `cf-connecting-ip` on Cloudflare). Read as the peer address, so trusted proxy settings are not
   * needed for it. Omit it when the platform does not give the address.
   */
  readonly clientAddressHeader?: string;
  /**
   * The platform this entry runs on. Its geo source (Cloudflare `request.cf`, Vercel's `x-vercel-ip-*` headers, Netlify's
   * `x-nf-geo`) becomes `event.geo`. Omit it and `event.geo` is empty: a client's own headers are never read.
   */
  readonly geo?: GeoPlatform;
}

Members#

Name Type Description
clientAddressHeader? readonly clientAddressHeader?: string Header the platform sets to the real client address and overwrites on the way in (for example cf-connecting-ip on Cloudflare). Read as the peer address, so trusted proxy settings are not needed for it. Omit it when the platform does not give the address.
geo? readonly geo?: GeoPlatform The platform this entry runs on. Its geo source (Cloudflare request.cf, Vercel's x-vercel-ip-* headers, Netlify's x-nf-geo) becomes event.geo. Omit it and event.geo is empty: a client's own headers are never read.