Increase read limit to 1MB for preview websocket

pull/25/head
Jan-Lukas Else 8 months ago
parent 634f139bae
commit 80f983c927
  1. 1
      editor.go

@ -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()

Loading…
Cancel
Save