From 09aec7b22e90c311e632fc64bf7aadaa6e79989d Mon Sep 17 00:00:00 2001 From: lloydzhou Date: Wed, 4 Sep 2024 21:32:22 +0800 Subject: [PATCH] using tauri http api run plugin to fixed cors in App --- app/store/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/store/plugin.ts b/app/store/plugin.ts index 3bf08e68d..74f0fbe17 100644 --- a/app/store/plugin.ts +++ b/app/store/plugin.ts @@ -62,7 +62,7 @@ export const FunctionToolService = { const api = new OpenAPIClientAxios({ definition: yaml.load(plugin.content) as any, axiosConfigDefaults: { - adapter: adapter as any, + adapter: (window.__TAURI__ ? adapter : ["xhr"]) as any, baseURL, headers, },