isAllowedMethod method

bool isAllowedMethod (
  1. String method
)

Implementation

bool isAllowedMethod(String method) {
  if (_allowAllMethods) return true;
  method = method.toUpperCase();
  if (method == 'OPTIONS') return true;
  for (var allowedMethod in _allowedMethods) {
    if (method == allowedMethod) {
      return true;
    }
  }
  return false;
}