Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.06 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.06 KB

qoq-helmet

Important security headers for qoq based on koa-helmet.

License npm

Installation

yarn add qoq-helmet

Usage

import { WebSlotManager } from 'qoq';
import { helmets, Helmet } from 'qoq-helmet';

// This...
export const webSlots = WebSlotManager.use(new Helmet());

// ...is equivalent to this:
export const webSlots = WebSlotManager.use(helmets.contentSecurityPolicy())
  .use(helmets.dnsPrefetchControl())
  .use(helmets.expectCt())
  .use(helmets.frameguard())
  .use(helmets.hidePoweredBy())
  .use(helmets.hsts())
  .use(helmets.ieNoOpen())
  .use(helmets.noSniff())
  .use(helmets.originAgentCluster())
  .use(helmets.permittedCrossDomainPolicies())
  .use(helmets.referrerPolicy())
  .use(helmets.xssFilter());

Options

@see helmet