lib/utils.js
function shouldIgnore(req, options) {
  var logger = getLogger(req, options);
  if (options.match && options.match.splice && options.match.length) {
    var matchedRule;
    var hasMatch = options.match.some(function (rule) {
      matchedRule = rule;
      return isMatchRule(req, req.path, rule);
    });

    if (hasMatch) {
      logger.info('Matched match rule.', matchedRule, ' Go into CAS authentication.');
      return false;
    }

    return true;
  }

  if (options.ignore && options.ignore.splice && options.ignore.length) {
    var matchedIgnoreRule;
    var hasMatchIgnore = options.ignore.some(function (rule) {
      matchedIgnoreRule = rule;
      return isMatchRule(req, req.path, rule);
    });

    if (hasMatchIgnore) {
      logger.info('Matched ignore rule.', matchedIgnoreRule, ' Go through CAS.');
      return true;
    }

    return false;
  }

  return false;
}
function shouldIgnore(req, options) {
  var logger = getLogger(req, options);
  if (options.match && options.match.splice && options.match.length) {
    var matchedRule;
    var hasMatch = options.match.some(function (rule) {
      matchedRule = rule;
      return isMatchRule(req, req.path, rule);
    });

    if (hasMatch) {
      logger.info('Matched match rule.', matchedRule, ' Go into CAS authentication.');
      return false;
    }

    return true;
  }

  if (options.ignore && options.ignore.splice && options.ignore.length) {
    var matchedIgnoreRule;
    var hasMatchIgnore = options.ignore.some(function (rule) {
      matchedIgnoreRule = rule;
      return isMatchRule(req, req.path, rule);
    });

    if (hasMatchIgnore) {
      logger.info('Matched ignore rule.', matchedIgnoreRule, ' Go through CAS.');
      return true;
    }

    return false;
  }

  return false;
}
function shouldIgnore ( req , options ) { var logger = getLogger ( req , options ) ; if ( options . match && options . match . splice && options . match . length ) { var matchedRule ; var hasMatch = options . match . some ( function ( rule ) { matchedRule = rule ; return isMatchRule ( req , req . path , rule ) ; } ) ; if ( hasMatch ) { logger . info ( 'Matched match rule.' , matchedRule , ' Go into CAS authentication.' ) ; return false ; } return true ; } if ( options . ignore && options . ignore . splice && options . ignore . length ) { var matchedIgnoreRule ; var hasMatchIgnore = options . ignore . some ( function ( rule ) { matchedIgnoreRule = rule ; return isMatchRule ( req , req . path , rule ) ; } ) ; if ( hasMatchIgnore ) { logger . info ( 'Matched ignore rule.' , matchedIgnoreRule , ' Go through CAS.' ) ; return true ; } return false ; } return false ; }
Check options.match first, if match, return `false`, then check the options.ignore, if match, return `true`.

If returned `true`, then this request will bypass CAS directly.

@param req
@param options
@param logger
Check options . match first if match return false then check the options . ignore if match return true .