pub fn is_local_origin(origin: &str) -> boolExpand description
Returns true if the origin string resolves to a local host.
Accepted hosts: localhost, 127.0.0.1, ::1, tauri.localhost.
Schemes http and https are accepted; ports are ignored.
Tauri custom schemes (tauri://localhost, asset://localhost) are also accepted.
URLs with userinfo (e.g. http://user@localhost) are rejected to prevent
credential-injection bypasses.
Malformed URLs, missing hosts, and non-local hosts return false.