Validate Content-Type header for REST API requests #10031
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
NetBox version
v3.2.9
Feature type
New functionality
Proposed functionality
Implement logic to check that the
Content-Type
header for inbound REST API requests has been properly set toapplication/json
, and return an error if missing or invalid.Use case
Currently, if a REST API request is made to create an object without specifying the correct content type, validation will fail reporting missing required fields. This is because the serializer (which expects JSON data) is not properly processing the request. This can be very confusing to the user.
Database changes
No response
External dependencies
No response
The text was updated successfully, but these errors were encountered: