CsrfOptions
Options of the CSRF check.
Options of the CSRF check.
Import#
ts
import type { CsrfOptions } from "@shadow-js/dusk/server";
Signature#
ts
interface CsrfOptions {
/** Origins (besides the request's own) allowed to send state-changing requests. */
readonly trustedOrigins?: readonly string[];
/**
* Accept state-changing requests that carry no `Sec-Fetch-Site`, `Origin` or `Referer`
* (command-line clients). Default `false`: such requests are rejected.
*/
readonly allowMissingOrigin?: boolean;
}
Members#
| Name | Type | Description |
|---|---|---|
trustedOrigins? |
readonly trustedOrigins?: readonly string[] |
Origins (besides the request's own) allowed to send state-changing requests. |
allowMissingOrigin? |
readonly allowMissingOrigin?: boolean |
Accept state-changing requests that carry no Sec-Fetch-Site, Origin or Referer (command-line clients). Default false: such requests are rejected. |