Enhance WebSocket handling and log polling logic
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-11 16:25:48 +11:00
parent ffd43d5217
commit e48a061ca0
6 changed files with 126 additions and 39 deletions
+34 -34
View File
File diff suppressed because one or more lines are too long
+9 -1
View File
@@ -15,6 +15,14 @@ import (
"github.com/gorilla/websocket"
)
var wsUpgrader = websocket.Upgrader{
ReadBufferSize: 4096,
WriteBufferSize: 4096,
CheckOrigin: func(r *http.Request) bool {
return true
},
}
// StartWebserver : Startet den Webserver
func StartWebserver() (err error) {
@@ -336,7 +344,7 @@ func WS(w http.ResponseWriter, r *http.Request) {
}
*/
conn, err := websocket.Upgrade(w, r, w.Header(), 1024, 1024)
conn, err := wsUpgrader.Upgrade(w, r, nil)
if err != nil {
ShowError(err, 0)
http.Error(w, "Could not open websocket connection", http.StatusBadRequest)