Expand description
The navigation guard: a window stays on the app’s own pages (its local page, or the hosted web app it shows); a web link elsewhere opens in the person’s browser; anything else is refused.
Enums§
- Navigation
- What the window does with a navigation.
- Origin
Error - Why an address cannot be a hosted app’s origin. None of them repeats the address: it may hold a credential.
Functions§
- decide
- Decides a navigation of a window whose own places are
allowed(the local page, the hosted app’s origin). - normalize_
origin - A hosted app must be HTTPS (plain http only for a loopback address), carry no credentials in its URL, and is reduced to its origin.
- same_
origin - True when
targetis on the same origin asallowed. A look-alike host (app.example.com.evil.example) is not. - same_
place - The same place: scheme, host and port. Unlike
same_origin, it also matches the app’s own local page (tauri://localhost), whose origin the URL standard calls opaque.