From 94ee41479ee3fd0c129a00a477edcd9413c2ce04 Mon Sep 17 00:00:00 2001 From: Wes Date: Tue, 6 Feb 2024 11:55:29 -0700 Subject: [PATCH] fix: remove content type validation on bytes (#882) --- backend/controller/ingress/ingress.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/controller/ingress/ingress.go b/backend/controller/ingress/ingress.go index aaeff69819..8a66ee84b0 100644 --- a/backend/controller/ingress/ingress.go +++ b/backend/controller/ingress/ingress.go @@ -75,10 +75,6 @@ func ValidateContentType(dataRef *schema.DataRef, sch *schema.Schema, headers ma contentType := headers["Content-Type"][0] switch bodyField.Type.(type) { - case *schema.Bytes: - if !strings.HasPrefix(contentType, "application/octet-stream") { - return fmt.Errorf("expected application/octet-stream content type, got %s", contentType) - } case *schema.String, *schema.Int, *schema.Float, *schema.Bool: if !strings.HasPrefix(contentType, "text/") { return fmt.Errorf("expected text content type, got %s", contentType)