Iskra API Reference
    Preparing search index...

    Interface CsrfConfig

    interface CsrfConfig {
        cookieName?: string;
        cookieOptions?: {
            httpOnly?: boolean;
            maxAge?: number;
            sameSite?: "Strict" | "Lax" | "None";
            secure?: boolean;
        };
        headerName?: string;
        ignoreMethods?: string[];
        secret: string;
        trustedOrigins?: string[];
    }
    Index
    cookieName?: string

    Default "__Host-csrf" while the cookie is Secure (the default), "_csrf" otherwise.

    cookieOptions?: {
        httpOnly?: boolean;
        maxAge?: number;
        sameSite?: "Strict" | "Lax" | "None";
        secure?: boolean;
    }
    headerName?: string
    ignoreMethods?: string[]
    secret: string

    Signs the tokens; at least 32 characters.

    trustedOrigins?: string[]

    Other origins whose pages may send state-changing requests (e.g. a frontend on another subdomain), as https://app.example.com. Requests whose Origin is neither the app's own nor one of these are rejected.