areAllowedHeaders method

bool areAllowedHeaders (
  1. List<String> headers
)

Implementation

bool areAllowedHeaders(List<String> headers) {
  if (headers.length == 0) return true;
  if (_allowAllHeaders) return true;
  bool areAllowed = true;
  for (var header in headers) {
    if (_allowedHeaders.contains(header)) {
      areAllowed = true;
    } else {
      areAllowed = false;
      break;
    }
  }
  return areAllowed;
}