Context
I'm building a proxy based on sozu (called Sozune) and would like to intercept HTTP requests and responses to modify them before they are sent or received.
Need
I'm looking for a simple way to add a hook or extension point to:
rewrite or modify requests (path, headers, etc.) before routing;
rewrite or modify responses (headers, status, etc.) before sending them back to the client.
Ideally, this would just allow plugging a function or callback at those two stages in the pipeline.
any idea?