Blame view

node_modules/dns-prefetch-control/index.js 367 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
  module.exports = function dnsPrefetchControl (options) {
    if (options && options.allow) {
      return function dnsPrefetchControl (req, res, next) {
        res.setHeader('X-DNS-Prefetch-Control', 'on')
        next()
      }
    } else {
      return function dnsPrefetchControl (req, res, next) {
        res.setHeader('X-DNS-Prefetch-Control', 'off')
        next()
      }
    }
  }