mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Remove redundant IPC endpoint.
Don't auto-inject runtime.
This commit is contained in:
@@ -18,7 +18,6 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
runtimeJSPath = "/wails/runtime.js"
|
runtimeJSPath = "/wails/runtime.js"
|
||||||
ipcJSPath = "/wails/ipc.js"
|
|
||||||
runtimePath = "/wails/runtime"
|
runtimePath = "/wails/runtime"
|
||||||
capabilitiesPath = "/wails/capabilities"
|
capabilitiesPath = "/wails/capabilities"
|
||||||
flagsPath = "/wails/flags"
|
flagsPath = "/wails/flags"
|
||||||
@@ -229,13 +228,6 @@ func (d *AssetServer) serveHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||||||
d.runtimeHandler.HandleRuntimeCall(rw, req)
|
d.runtimeHandler.HandleRuntimeCall(rw, req)
|
||||||
return
|
return
|
||||||
|
|
||||||
case ipcJSPath:
|
|
||||||
content := d.runtime.DesktopIPC()
|
|
||||||
if d.ipcJS != nil {
|
|
||||||
content = d.ipcJS(req)
|
|
||||||
}
|
|
||||||
d.writeBlob(rw, path, content)
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Check if this is a plugin script
|
// Check if this is a plugin script
|
||||||
if script, ok := d.pluginScripts[path]; ok {
|
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
|
// Inject plugins
|
||||||
for scriptName := range d.pluginScripts {
|
for scriptName := range d.pluginScripts {
|
||||||
if err := insertScriptInHead(htmlNode, scriptName); err != nil {
|
if err := insertScriptInHead(htmlNode, scriptName); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user