Enforce Content-Type middleware
This middleware enforces the Content-Type
header of requests to be a specified value.
If the header doesn't match that value, a HTTP status code 415 "Unsupported Media Type" is returned.
var enforceContentType = app
It is also possible to specify multiple acceptable content types:
app
Requests without a body are not enforced unless the force
option is set to true:
app