Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hpkp

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hpkp

HTTP Public Key Pinning (HPKP) middleware

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
502K
increased by9.44%
Maintainers
1
Weekly downloads
 
Created
Source

HTTP Public Key Pinning (HPKP) middleware

Adds Public Key Pinning headers to Express/Connect applications. To learn more about HPKP, check out the spec, the article on MDN, and this tutorial.

Usage:

var express = require('express');
var hpkp = require('hpkp');

var app = express();

var ninetyDaysInMilliseconds = 7776000000;
app.use(hpkp({
  maxAge: ninetyDaysInMilliseconds,
  sha256s: ['AbCdEf123=', 'ZyXwVu456='],
  includeSubdomains: true,         // optional
  reportUri: 'http://example.com'  // optional
}));

Specifying a report-uri changes the header from Public-Key-Pins to Public-Key-Pins-Report-Only. To reverse this, set another option: reportOnly: false. This behavior will change in the 1.0 release.

Keywords

FAQs

Package last updated on 26 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc