From 7f8c1c8a6851df757fd5acdd39cccb9dfd404a07 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Fri, 29 Dec 2023 12:42:03 +1100 Subject: [PATCH] Remove redundant IPC endpoint. Don't auto-inject runtime. --- v3/internal/assetserver/assetserver.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/v3/internal/assetserver/assetserver.go b/v3/internal/assetserver/assetserver.go index ba3a39076..dc0785ca0 100644 --- a/v3/internal/assetserver/assetserver.go +++ b/v3/internal/assetserver/assetserver.go @@ -18,7 +18,6 @@ import ( const ( runtimeJSPath = "/wails/runtime.js" - ipcJSPath = "/wails/ipc.js" runtimePath = "/wails/runtime" capabilitiesPath = "/wails/capabilities" flagsPath = "/wails/flags" @@ -229,13 +228,6 @@ func (d *AssetServer) serveHTTP(rw http.ResponseWriter, req *http.Request) { d.runtimeHandler.HandleRuntimeCall(rw, req) return - case ipcJSPath: - content := d.runtime.DesktopIPC() - if d.ipcJS != nil { - content = d.ipcJS(req) - } - d.writeBlob(rw, path, content) - default: // Check if this is a plugin script if script, ok := d.pluginScripts[path]; ok { @@ -260,16 +252,6 @@ func (d *AssetServer) processIndexHTML(indexHTML []byte) ([]byte, error) { } } - if err := insertScriptInHead(htmlNode, runtimeJSPath); err != nil { - return nil, err - } - - if d.debug { - if err := insertScriptInHead(htmlNode, ipcJSPath); err != nil { - return nil, err - } - } - // Inject plugins for scriptName := range d.pluginScripts { if err := insertScriptInHead(htmlNode, scriptName); err != nil {