Increase read limit to 1MB for preview websocket

This commit is contained in:
Jan-Lukas Else 2022-04-12 19:39:47 +02:00
parent 634f139bae
commit 80f983c927
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ func (a *goBlog) serveEditorPreview(w http.ResponseWriter, r *http.Request) {
if err != nil {
return
}
c.SetReadLimit(1 << 20) // 1MB
defer c.Close(ws.StatusNormalClosure, "")
ctx, cancel := context.WithTimeout(r.Context(), time.Minute*60)
defer cancel()