I use attributes in my MVC application in order to catch incoming requests and authorize the nature of them, aka the Front Controller pattern. I want to also have an attribute in my WebApi that intercepts outgoing Responses once the Server has processed the request.
I want to do this to check the Type of the object being returned by the API, to ensure there is no leaking of sensitive internal data. Whilst thorough testing should prevent this ever happening, I wanted to implement this outgoing attribute check to be doubly sure.
Are there are framework components built in to MVC to facilitate outgoing callbacks?
Many thanks for your help