isLikelyProxyIncompatibleDocument static method

bool isLikelyProxyIncompatibleDocument(
  1. String html
)

Detects HTML payloads that are known to break when rendered from a data: URL origin (for example Cloudflare challenge pages).

Such pages generally require first-party origin semantics and should be opened directly in a browser tab/window instead of proxy-injected mode.

Implementation

static bool isLikelyProxyIncompatibleDocument(String html) {
  if (html.isEmpty) return false;
  return _proxyIncompatiblePageSignals
      .any((pattern) => pattern.hasMatch(html));
}