use 127.0.0.1 for macOS localhost navigation to avoid ATS SSL errors

This commit is contained in:
2026-09-05 09:15:27 -07:00
parent c8ea2598b9
commit b19e6b21c9
2 changed files with 3 additions and 3 deletions

View File

@@ -503,9 +503,9 @@ fn open_new_window(app: tauri::AppHandle, url: String) -> Result<(), String> {
let final_url = if url.starts_with("http") || url.starts_with("tauri://") {
url.clone()
} else if url.starts_with('/') {
format!("http://localhost:4890{}", url)
format!("http://127.0.0.1:4890{}", url)
} else {
format!("http://localhost:4890/{}", url)
format!("http://127.0.0.1:4890/{}", url)
};
if let Some(window) = app.get_webview_window("main") {