import { ContentTypeSniffingOptions } from '@ioc:Adonis/Addons/Shield' ; import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext' ; import { noop } from './noop' ; /**
 * Factory function that returns a function to Add `X-Content-Type-Options`
 * header based upon given user options.
 */ export function noSniffFactory ( options ) { if ( ! options . enabled ) { return noop ; } return function noSniff ( { response } ) { response . header ( 'X-Content-Type-Options' , 'nosniff' ) ; } ; }