validateUri

fun validateUri(uri: String, allowPrivateAddresses: Boolean = false)

Validates uri without performing a name lookup.

For use from shouldOverrideUrlLoading, which is a synchronous main-thread callback where resolution is not permitted. Literal addresses are checked outright; a hostname is checked against what validateUriResolving previously resolved, and a host never seen before is allowed through here so that the navigation itself can validate it properly.