Remove redundant IPC endpoint.

Don't auto-inject runtime.
This commit is contained in:
Lea Anthony 2023-12-29 12:42:03 +11:00
commit 7f8c1c8a68
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405

View file

@ -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 {