|
@@ -1892,11 +1892,13 @@ impl Allowlist for DialogAllowlistConfig {
|
|
/// The scoped URL is matched against the request URL using a glob pattern.
|
|
/// The scoped URL is matched against the request URL using a glob pattern.
|
|
///
|
|
///
|
|
/// Examples:
|
|
/// Examples:
|
|
-/// - "https://**": allows all HTTPS urls
|
|
|
|
|
|
+/// - "https://*": allows all HTTPS urls
|
|
/// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path
|
|
/// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path
|
|
/// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/"
|
|
/// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/"
|
|
#[allow(rustdoc::bare_urls)]
|
|
#[allow(rustdoc::bare_urls)]
|
|
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
|
|
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
|
|
|
|
+// TODO: in v2, parse into a String or a custom type that perserves the
|
|
|
|
+// glob string because Url type will add a trailing slash
|
|
#[cfg_attr(feature = "schema", derive(JsonSchema))]
|
|
#[cfg_attr(feature = "schema", derive(JsonSchema))]
|
|
pub struct HttpAllowlistScope(pub Vec<Url>);
|
|
pub struct HttpAllowlistScope(pub Vec<Url>);
|
|
|
|
|