Explorar el Código

using tauri http api run plugin to fixed cors in App

lloydzhou hace 1 año
padre
commit
09aec7b22e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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,
       },