fix(client): use http extension for fetching on backend

Originally, using the built-in `fetch()` resulted in CORS errors because it was fetching from the "frontend", which doesn't work after building. This commit migrates to Tauri's HTTP plugin, which is made for exactly this scenario.
This commit is contained in:
ByteAtATime 2025-06-22 10:45:06 -07:00
parent 28d1605bba
commit ffd8f3c4bf
No known key found for this signature in database
7 changed files with 235 additions and 1 deletions

View file

@ -137,6 +137,7 @@ fn setup_global_shortcut(app: &mut tauri::App) -> Result<(), Box<dyn std::error:
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_http::init())
.manage(WsState::default())
.plugin(tauri_plugin_single_instance::init(|app, args, _cwd| {
if args.len() > 1 && args[1].starts_with("raycast://") {