mirror of
https://codeberg.org/tacerus/teddit.git
synced 2025-01-10 13:32:30 +01:00
12 lines
409 B
JavaScript
12 lines
409 B
JavaScript
"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;
|