|
|
6 years ago | |
|---|---|---|
| .. | ||
| dist | 6 years ago | |
| CHANGELOG.md | 6 years ago | |
| LICENSE | 6 years ago | |
| README.md | 6 years ago | |
| package.json | 6 years ago | |
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 }))