Files
menui_backend/node_modules/helmet/dist/middlewares/x-dns-prefetch-control/index.js
2020-07-15 19:54:48 +02:00

13 lines
448 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function xDnsPrefetchControl(options) {
if (options === void 0) { options = {}; }
var 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;