Skip to content

Commit

Permalink
return 413 if request body is too big
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Feb 17, 2024
1 parent 11d99de commit 250679a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fed/inbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (l *Listener) handleInbox(w http.ResponseWriter, r *http.Request) {

body, err := io.ReadAll(io.LimitReader(r.Body, l.Config.MaxRequestBodySize))
if err != nil {
w.WriteHeader(http.StatusRequestEntityTooLarge)
return
}

Expand Down

0 comments on commit 250679a

Please sign in to comment.