docs: function cors(options) {
      options = _.merge({}, DEF_CONFIG, options);
      DEBUG && debug('configure http cors middleware', options);
      return function (req, res, next) {
          if (req.headers.origin) {
              res.header('Access-Control-Allow-Origin', options.origin === '*' ? req.headers.origin : options.origin);
              res.header('Access-Control-Allow-Methods', options.methods);
              res.header('Access-Control-Allow-Headers', options.headers);
              res.header('Access-Control-Allow-Credentials', options.credentials);
              res.header('Access-Control-Max-Age', options.maxAge);
              if ('OPTIONS' === req.method) {
                  // CORS pre-flight request -> no content
                  return res.send(errors.StatusCode.NO_CONTENT);
              }
          }
          return next();
      };
  }