Skip to content

Commit

Permalink
fix: remove content type validation on bytes (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman authored Feb 6, 2024
1 parent 4d2f471 commit 94ee414
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions backend/controller/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 94ee414

Please sign in to comment.