upload site
This commit is contained in:
commit
69c5b90d6a
3300 changed files with 224783 additions and 0 deletions
16
node_modules/dns-prefetch-control/dist/index.js
generated
vendored
Normal file
16
node_modules/dns-prefetch-control/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
function getHeaderValueFromOptions(options) {
|
||||
if (options && options.allow) {
|
||||
return 'on';
|
||||
}
|
||||
else {
|
||||
return 'off';
|
||||
}
|
||||
}
|
||||
module.exports = function dnsPrefetchControl(options) {
|
||||
var headerValue = getHeaderValueFromOptions(options);
|
||||
return function dnsPrefetchControl(_req, res, next) {
|
||||
res.setHeader('X-DNS-Prefetch-Control', headerValue);
|
||||
next();
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue