Added "WithMaxBytes" middleware

This commit is contained in:
Robin Dittmar
2026-07-20 20:12:45 +02:00
parent 10a34387ef
commit caf79e0dff
3 changed files with 14 additions and 2 deletions
-2
View File
@@ -14,8 +14,6 @@ type CreateListPayload struct {
func DecodeCreateList(r *http.Request) (CreateListPayload, error) {
var payload CreateListPayload
r.Body = http.MaxBytesReader(nil, r.Body, 1024*64)
decoder := json.NewDecoder(r.Body)
decoder.DisallowUnknownFields()