Well the first one can be pretty easily checked for by fetching all the headers from the request and checking on it
// Inside your middleware
$headers = request()->headers->all();
if (isset($headers['content-type']) && $headers['content-type'] === 'vnd.api+json') {
return response()->json(['message' => 'Unsupported Media Type'], 415);
}
Note: You can make this code more readable using collections and stuff, but I think you get the idea this way ;)
For your second question you need some kind of abstraction right. So you can for example create your own response class that always has some kind of headers. I would personally build a class around the response->json() helper and just pass in your own extra details you need ;)
You might find this series interesting for that: https://laracasts.com/series/incremental-api-development
Let me know if that is clear for you!