fix(windows): isolation pattern create iframe loop (#13849)

This commit is contained in:
Tony
2025-07-21 05:33:14 +08:00
committed by GitHub
parent 56277e4722
commit 6a4451bcd9
2 changed files with 8 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fix isolation pattern creates iframes within iframes on Windows

View File

@@ -84,12 +84,12 @@ pub(crate) struct PatternJavascript {
pub(crate) pattern: PatternObject,
}
#[allow(dead_code)]
#[cfg(feature = "isolation")]
pub(crate) fn format_real_schema(schema: &str, https: bool) -> String {
if cfg!(windows) || cfg!(target_os = "android") {
let scheme = if https { "https" } else { "http" };
format!("{scheme}://{schema}.{ISOLATION_IFRAME_SRC_DOMAIN}")
format!("{scheme}://{schema}.{ISOLATION_IFRAME_SRC_DOMAIN}/")
} else {
format!("{schema}://{ISOLATION_IFRAME_SRC_DOMAIN}")
format!("{schema}://{ISOLATION_IFRAME_SRC_DOMAIN}/")
}
}