fix(core): check whether external url is local, ref #4449 (#4536)

This commit is contained in:
Lucas Fernandes Nogueira 2022-06-30 10:38:46 -03:00 committed by GitHub
parent 23a48007c0
commit 2e74d20e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -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.

View File

@ -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!(),
};