Name Last Update
..
test Loading commit data...
.npmignore Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
index.js Loading commit data...
package.json Loading commit data...

DNS prefetch control header for Express

Build Status js-standard-style

Looking for a changelog?

This middleware lets you set the X-DNS-Prefetch-Control to control browsers' DNS prefetching. Read more about it on MDN and on Chromium's docs.

Usage:

var dnsPrefetchControl = require('dns-prefetch-control')

// Set X-DNS-Prefetch-Control: off
app.use(dnsPrefetchControl())

// Set X-DNS-Prefetch-Control: off
app.use(dnsPrefetchControl({ allow: false }))

// Set X-DNS-Prefetch-Control: on
app.use(dnsPrefetchControl({ allow: true }))