@adonisjs/shield
Version:
A middleware for AdonisJS to keep web applications secure from common web attacks
15 lines (14 loc) • 483 B
TypeScript
import type { ShieldConfig } from './types.ts';
/**
* Define shield configuration with default values.
* Merges provided partial configuration with defaults where all guards are disabled by default.
*
* @param config - Partial shield configuration object
*
* @example
* const shieldConfig = defineConfig({
* csrf: { enabled: true },
* hsts: { enabled: true, maxAge: '1 year' }
* })
*/
export declare function defineConfig(config: Partial<ShieldConfig>): ShieldConfig;