@bit-js/byte
Version:
A simple, performance-focused web framework that works on Bun, Deno, and browsers.
13 lines (12 loc) • 434 B
TypeScript
import type { Fn } from '../../core/server';
declare const defaultCSRF: (ctx: any) => Response | undefined;
/**
* CSRF action options
*/
export interface CSRFOptions<Fallback extends Fn = typeof defaultCSRF> {
origins?: string[];
verify?: (origin: string) => boolean;
fallback?: Fallback;
}
export declare function csrf<Options extends CSRFOptions = CSRFOptions>(options?: Options): Options['fallback'] & {};
export {};