Procházet zdrojové kódy

fix(core): set window URL before preparing asset protocol CORS header (#3346)

Lucas Fernandes Nogueira před 3 roky
rodič
revize
f739e446f5
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      core/tauri/src/manager.rs

+ 2 - 2
core/tauri/src/manager.rs

@@ -1002,6 +1002,8 @@ impl<R: Runtime> WindowManager<R> {
       }
     }
 
+    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<R: Runtime> WindowManager<R> {
       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"))]