@adonisjs/shield
Version:
A middleware for AdonisJS to keep web applications secure from common web attacks
13 lines (12 loc) • 490 B
TypeScript
import type { ContentTypeSniffingOptions } from '../types.ts';
import { noop } from '../noop.ts';
/**
* Factory function that returns a function to add `X-Content-Type-Options`
* header based upon given user options. Prevents MIME type sniffing attacks.
*
* @param options - Content type sniffing configuration options
*
* @example
* const noSniffGuard = noSniffFactory({ enabled: true })
*/
export declare function noSniffFactory(options: ContentTypeSniffingOptions): typeof noop;