dijkstra-backend-cloudron/node_modules/dns-prefetch-control
2020-10-12 11:27:15 +02:00
..
dist Add initial version of dijkstra backend cloudron image 2020-10-12 11:27:15 +02:00
CHANGELOG.md Add initial version of dijkstra backend cloudron image 2020-10-12 11:27:15 +02:00
LICENSE Add initial version of dijkstra backend cloudron image 2020-10-12 11:27:15 +02:00
package.json Add initial version of dijkstra backend cloudron image 2020-10-12 11:27:15 +02:00
README.md Add initial version of dijkstra backend cloudron image 2020-10-12 11:27:15 +02:00

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