diff --git a/backend/internal/httpapi/json_test.go b/backend/internal/httpapi/json_test.go index 04f0663..7587a0c 100644 --- a/backend/internal/httpapi/json_test.go +++ b/backend/internal/httpapi/json_test.go @@ -11,8 +11,6 @@ import ( ) func TestBindJSONRejectsUnknownFieldsAndTrailingValues(t *testing.T) { - t.Parallel() - tests := []struct { name string body string diff --git a/backend/internal/httpapi/middleware.go b/backend/internal/httpapi/middleware.go index 6d2e28c..569decf 100644 --- a/backend/internal/httpapi/middleware.go +++ b/backend/internal/httpapi/middleware.go @@ -93,13 +93,6 @@ func (s *Server) sameOriginForAPI(request *http.Request) bool { return strings.EqualFold(parsed.Host, request.Host) && strings.EqualFold(parsed.Scheme, requestScheme) } -func limitJSONBody(c *gin.Context) { - if c == nil || c.Request == nil || c.Request.Body == nil { - return - } - c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, jsonRequestBodyLimit) -} - func requestIDFromContext(c *gin.Context) string { value, exists := c.Get("request_id") if !exists {