Skip to content

zero-auth API Documentation v1.2.0


zero-auth API Documentation / CsrfConfig

Interface: CsrfConfig

Defined in: src/types/auth.ts:89

Configuration for the signed double-submit CSRF middleware.

Properties

cookieName?

optional cookieName?: string

Defined in: src/types/auth.ts:91

Client-readable CSRF cookie name.

Default

ts
"csrf_token"

headerName?

optional headerName?: string

Defined in: src/types/auth.ts:93

Header carrying the token copied from the CSRF cookie.

Default

ts
"x-csrf-token"

methods?

optional methods?: string[]

Defined in: src/types/auth.ts:95

HTTP methods to protect.

Default

ts
["POST", "PUT", "PATCH", "DELETE"]