Skip to content

Commit 2e74d20

Browse files
authored
fix(core): check whether external url is local, ref #4449 (#4536)
1 parent 23a4800 commit 2e74d20

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changes/fix-local-url-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes check for local URL when an external URL is provided to the window and it is based on the configured devPath.

core/tauri/src/manager.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,10 @@ impl<R: Runtime> WindowManager<R> {
10691069
},
10701070
)
10711071
}
1072-
WindowUrl::External(url) => (url.scheme() == "tauri", url.clone()),
1072+
WindowUrl::External(url) => {
1073+
let config_url = self.get_url();
1074+
(config_url.make_relative(url).is_some(), url.clone())
1075+
}
10731076
_ => unimplemented!(),
10741077
};
10751078

0 commit comments

Comments
 (0)