index.js 380 Bytes
Newer Older
Rosanny Sihombing's avatar
Rosanny Sihombing committed
1
2
3
4
5
6
7
8
9
10
11
"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
function xDnsPrefetchControl(options = {}) {
	const headerValue = options.allow ? "on" : "off"
	return function xDnsPrefetchControlMiddleware(_req, res, next) {
		res.setHeader("X-DNS-Prefetch-Control", headerValue)
		next()
	}
}
module.exports = xDnsPrefetchControl
exports.default = xDnsPrefetchControl