UNPKG

@adonisjs/shield

Version:

A middleware for AdonisJS to keep web applications secure from common web attacks

16 lines (15 loc) 480 B
import { noop } from '../noop.ts'; import { type XFrameOptions } from '../types.ts'; /** * Factory function that returns a function to set `X-Frame-Options` header * based upon given user options. Prevents clickjacking attacks. * * @param options - Frame guard configuration options * * @example * const frameGuard = frameGuardFactory({ * enabled: true, * action: 'SAMEORIGIN' * }) */ export declare function frameGuardFactory(options: XFrameOptions): typeof noop;