aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index f962a76..0539e1a 100644
--- a/main.go
+++ b/main.go
@@ -208,11 +208,15 @@ func wsEndpoint(w http.ResponseWriter, r *http.Request) {
uuidCookie, err := r.Cookie("UUID")
if err != nil {
llog.Error("websocket connection has no set UUID cookie")
+ http.Error(w, "websocket connection has no set UUID cookie", http.StatusBadRequest)
+ return
}
id, err := uuid.Parse(uuidCookie.Value)
if err != nil {
llog.Error("Invalid UUID set in cookie")
+ http.Error(w, "Invalid UUID set in cookie", http.StatusBadRequest)
+ return
}
defer func() {