Management API: Content-Type header not enforced - text/plain accepted

Resolved 💬 1 comment Opened Jan 29, 2026 by ikethepike Closed Jan 29, 2026

Bug Description

The Management API accepts requests with Content-Type: text/plain when it should only accept application/json.

Steps to Reproduce

curl -X POST "https://api-dev.invioinsights.com/admin/v1/products" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: text/plain" \
  -d '{"productId": "TEST-1", "name": "Test"}'

Expected Behavior

Return 415 Unsupported Media Type or 400 Bad Request when Content-Type is not application/json

Actual Behavior

Request is processed successfully (HTTP 201)

Impact

  • Security: Potential bypass of content type security controls
  • Consistency: API should be strict about accepted content types

Test Details

  • Test #1 from QA batch
  • Environment: invio-dev

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗