Przeglądaj źródła

using tauri http api run plugin to fixed cors in App

lloydzhou 1 rok temu
rodzic
commit
09aec7b22e
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/store/plugin.ts

+ 1 - 1
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,
       },