@adonisjs/shield
Version:
A middleware for AdonisJS to keep web applications secure from common web attacks
17 lines (16 loc) • 514 B
TypeScript
import { noop } from '../noop.ts';
import type { HstsOptions } from '../types.ts';
/**
* Factory function that returns a new function to add `Strict-Transport-Security`
* header based upon given user options. Enables HTTPS enforcement for enhanced security.
*
* @param options - HSTS configuration options
*
* @example
* const hstsGuard = hstsFactory({
* enabled: true,
* maxAge: '1 year',
* includeSubDomains: true
* })
*/
export declare function hstsFactory(options: HstsOptions): typeof noop;