npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

dns-prefetch-control

0.2.0 • Public • Published

DNS prefetch control header for Express

Build Status

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:

const 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 }))

install

npm i dns-prefetch-control

Downloadsweekly downloads

535,220

version

0.2.0

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability