diff --git a/editor.go b/editor.go index 5578e44..bf92cef 100644 --- a/editor.go +++ b/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()