From f739e446f5f920c26e2e0029d84fb3447e5179aa Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sun, 6 Feb 2022 18:50:59 -0300 Subject: [PATCH] fix(core): set window URL before preparing asset protocol CORS header (#3346) --- core/tauri/src/manager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 44dccfb85..8da0d8aa8 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -1002,6 +1002,8 @@ impl WindowManager { } } + pending.url = url.to_string(); + if is_local { let label = pending.label.clone(); pending = self.prepare_pending_window(pending, &label, window_labels, app_handle.clone())?; @@ -1012,8 +1014,6 @@ impl WindowManager { pending.file_drop_handler = Some(self.prepare_file_drop(app_handle)); } - pending.url = url.to_string(); - // in `Windows`, we need to force a data_directory // but we do respect user-specification #[cfg(any(target_os = "linux", target_os = "windows"))]