Skip to content

Commit

Permalink
fix(core): check whether external url is local, ref #4449 (#4536)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Jun 30, 2022
1 parent 23a4800 commit 2e74d20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-local-url-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Fixes check for local URL when an external URL is provided to the window and it is based on the configured devPath.
5 changes: 4 additions & 1 deletion core/tauri/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,10 @@ impl<R: Runtime> WindowManager<R> {
},
)
}
WindowUrl::External(url) => (url.scheme() == "tauri", url.clone()),
WindowUrl::External(url) => {
let config_url = self.get_url();
(config_url.make_relative(url).is_some(), url.clone())
}
_ => unimplemented!(),
};

Expand Down

0 comments on commit 2e74d20

Please sign in to comment.