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

This commit is contained in:
Lucas Fernandes Nogueira 2022-02-06 18:50:59 -03:00 committed by GitHub
parent 9b34055264
commit f739e446f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"))]