[]previous and next page

DuskDevConfig

Settings of dusk dev only; they never reach the server bundle.

Settings of dusk dev only; they never reach the server bundle.

Import#

ts
import type { DuskDevConfig } from "@shadow-js/dusk/vite";

Signature#

ts
interface DuskDevConfig {
  /**
   * Host names the dev server answers besides `localhost`. Vite refuses every other `Host` header with a 403, so a
   * name mapped to `127.0.0.1` in `/etc/hosts` (to try host-based routing) or a tunnel needs to be listed here.
   * Write a host name (`join.example.com`), a name with a port (the port is ignored), or `*.example.com` for the
   * subdomains (also `.example.com`, Vite's spelling, which includes `example.com` itself). `true` accepts every
   * host: use it only on a machine nobody else can reach, because a page that any host can read is open to DNS rebinding.
   *
   * The hosts the app declares in `security.allowedHosts` are always allowed in development; this list adds to them. It only
   * opens Vite's check: the app's own host check still applies, so a name that is not in `security.allowedHosts` passes Vite
   * and is then answered 400 by the handler.
   */
  readonly allowedHosts?: readonly string[] | true;
}

Members#

Name Type Description
allowedHosts? readonly allowedHosts?: readonly string[] | true Host names the dev server answers besides localhost. Vite refuses every other Host header with a 403, so a name mapped to 127.0.0.1 in /etc/hosts (to try host-based routing) or a tunnel needs to be listed here. Write a host name (join.example.com), a name with a port (the port is ignored), or *.example.com for the subdomains (also .example.com, Vite's spelling, which includes example.com itself). true accepts every host: use it only on a machine nobody else can reach, because a page that any host can read is open to DNS rebinding. The hosts the app declares in security.allowedHosts are always allowed in development; this list adds to them. It only opens Vite's check: the app's own host check still applies, so a name that is not in security.allowedHosts passes Vite and is then answered 400 by the handler.