CsrfOptions
Properties
Section titled “Properties”allowedOrigins
Section titled “allowedOrigins”
readonlyallowedOrigins: readonlystring[]
Origins allowed to send mutations, such as https://app.example.
allowSameSite?
Section titled “allowSameSite?”
readonlyoptionalallowSameSite?:boolean
Accept Sec-Fetch-Site: same-site too, for sibling subdomains you trust. Default false.
crossSiteOrigins?
Section titled “crossSiteOrigins?”
readonlyoptionalcrossSiteOrigins?: readonlystring[]
Exact origins allowed to send mutations from another site, such as a
desktop shell on its own scheme (app://desktop). An origin listed here
counts as allowed, and its Sec-Fetch-Site: cross-site requests pass;
the double-submit token is still required. Matched exactly, no
wildcards. Trust each one as much as your own origin. Default none.
headerName?
Section titled “headerName?”
readonlyoptionalheaderName?:string
Header the page echoes the token in. Default x-csrf-token.
secrets
Section titled “secrets”
readonlysecrets: readonly (string|Uint8Array<ArrayBufferLike>)[]
Signs the double-submit token. At least 32 bytes each, and not the auth secret. Current secret first, previous ones after it during a rollover: a safe request replaces a token signed by a previous secret with one under the current secret.