From 25ecd60fcf3fbc71c8c8b7476d05723f6db4e25f Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Sat, 21 Sep 2024 21:20:29 +0200 Subject: [PATCH] Deactivated allowedorigins security --- crates/tauri-plugin-holochain/src/lib.rs | 27 ++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/crates/tauri-plugin-holochain/src/lib.rs b/crates/tauri-plugin-holochain/src/lib.rs index 2504504f..2f8d33f2 100644 --- a/crates/tauri-plugin-holochain/src/lib.rs +++ b/crates/tauri-plugin-holochain/src/lib.rs @@ -232,19 +232,20 @@ impl HolochainPlugin { let admin_ws = self.admin_websocket().await?; // Allow any when the app is build in debug mode to allow normal tauri development pointing to http://localhost:1420 - let allowed_origins = if tauri::is_dev() { - AllowedOrigins::Any - } else { - let mut origins: HashSet = HashSet::new(); - origins.insert(happ_origin(app_id)); - - if main_window { - origins.insert("http://tauri.localhost".into()); - origins.insert("tauri://localhost".into()); - } - - AllowedOrigins::Origins(origins) - }; + let allowed_origins = + // if tauri::is_dev() { + AllowedOrigins::Any; + // } else { + // let mut origins: HashSet = HashSet::new(); + // origins.insert(happ_origin(app_id)); + + // if main_window { + // origins.insert("http://tauri.localhost".into()); + // origins.insert("tauri://localhost".into()); + // } + + // AllowedOrigins::Origins(origins) + // }; let app_port = admin_ws .attach_app_interface(0, allowed_origins, Some(app_id.clone()))