Package 

Class HostsSanitizer


  • 
    public final class HostsSanitizer
    
                        

    Utility class with the goal to perform host sanitization. Not intended for the public use.

    • Method Summary

      Modifier and Type Method Description
      final List<String> sanitizeHosts(List<String> hosts, String feature) Sanitizes a list of first-party host entries.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HostsSanitizer

        HostsSanitizer()
    • Method Detail

      • sanitizeHosts

         final List<String> sanitizeHosts(List<String> hosts, String feature)

        Sanitizes a list of first-party host entries. Wildcard-free entries are validated as host names (URLs and IPs are tolerated, with a warning for URLs); entries containing a * are validated as wildcard patterns. Invalid entries are dropped and logged.

        Parameters:
        hosts - Hosts and wildcard patterns to sanitize.
        feature - SDK feature requesting the sanitization.