Interface CSRFConfig

interface CSRFConfig {
    cookieName?: string;
    cookieOptions?: {
        httpOnly?: boolean;
        maxAge?: number;
        sameSite?: "strict" | "lax" | "none";
        secure?: boolean;
    };
    enabled?: boolean;
    excludedMethods?: string[];
    excludedPaths?: string[];
    headerName?: string;
    secret?: string;
    tokenLength?: number;
}

Properties

cookieName?: string
cookieOptions?: {
    httpOnly?: boolean;
    maxAge?: number;
    sameSite?: "strict" | "lax" | "none";
    secure?: boolean;
}

Type declaration

  • Optional httpOnly?: boolean
  • Optional maxAge?: number
  • Optional sameSite?: "strict" | "lax" | "none"
  • Optional secure?: boolean
enabled?: boolean
excludedMethods?: string[]
excludedPaths?: string[]
headerName?: string
secret?: string
tokenLength?: number