I think you can just write a new middleware module that sets properties of the response.