diff --git a/contrib/ui/mesh-ui/webview.go b/contrib/ui/mesh-ui/webview.go
index eff6d442..0cc0b873 100644
--- a/contrib/ui/mesh-ui/webview.go
+++ b/contrib/ui/mesh-ui/webview.go
@@ -3,6 +3,7 @@ package main
import (
"log"
"os"
+ "strings"
"github.com/RiV-chain/RiV-mesh/src/defaults"
@@ -46,6 +47,191 @@ func main() {
}
log.Printf("Opening: %v", confui.IndexHtml)
- w.Navigate(confui.IndexHtml)
+ w.SetHtml(strings.Replace(splash, "http://localhost:19019", confui.IndexHtml, 1))
w.Run()
}
+
+var splash = `
+
+
+Riv mesh
+
+
+
+
+
+
+
+
+
+`
diff --git a/src/restapi/rest_server.go b/src/restapi/rest_server.go
index 968147ce..3db62a1f 100644
--- a/src/restapi/rest_server.go
+++ b/src/restapi/rest_server.go
@@ -125,6 +125,8 @@ func addNoCacheHeaders(w http.ResponseWriter) {
}
func (a *RestServer) apiHandler(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Access-Control-Allow-Origin", "*")
+ w.Header().Set("Access-Control-Allow-Headers", "*")
fmt.Fprintf(w, "Following methods are allowed: GET /api/self, getpeers. litening")
}