mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-09-12 17:06:26 +00:00
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:
parent
28d1605bba
commit
ffd8f3c4bf
7 changed files with 235 additions and 1 deletions
|
@ -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://") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue