using tauri http api run plugin to fixed cors in App

This commit is contained in:
lloydzhou 2024-09-04 21:32:22 +08:00
parent f9a047aad4
commit 09aec7b22e
1 changed files with 1 additions and 1 deletions

View File

@ -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,
},