code: function hstsFactory(options/*, includeSubdomains*/) {
    options = options || {};
    if (arguments.length === 2) {
      options = {
        maxAge: arguments[0],
        includeSubdomains: arguments[1]
      };
    }
    if (options === true) {
      options = {
        includeSubdomains: true
      };
    }
    if (typeof options === 'number') {
      options = {
        maxAge: options
      };
    }
  
  
    var maxAge = options.maxAge || MAX_AGE;
    var subdomains = options.includeSubdomains || false;
  
    var str = 'max-age=' + maxAge;
    if (subdomains) {
      str += '; includeSubdomains';
    }
    return function hsts(req, res, next) {
      if (req.connection.encrypted || req.secure || req.connection.proxySecure) {
        res.setHeader(HEADER, str);
      }
      next();
    };
  }
docs: hsts({ maxAge, includeSubdomains }) hsts(maxAge, includeSubdomains); hsts(includeSubdomains);