add read limit to help reduce malicious communication

This commit is contained in:
Roland Osborne 2022-01-22 20:46:58 -08:00
parent 807df99d9a
commit e9c1ab475f

View File

@ -23,6 +23,7 @@ func Status(w http.ResponseWriter, r *http.Request) {
return
}
defer conn.Close()
conn.SetReadLimit(APP_BODYLIMIT)
// receive announce
t, m, res := conn.ReadMessage()