Open jcrugzz opened 10 years ago
:+1:
I wrote a very simple middleware which can be plugged into http-proxy. It allows modifying the proxied data by providing a simple function. It is called transformer-proxy. Maybe someone finds it useful.
The modifyResponse-middleware.js-example didn't work for me, because the data is passed in chunks and not as a whole and the content-length becomes wrong when the data length is changed.
Based around the concept I outlined here. This will allow arbitrary transformations of the request being proxied as well as the response we get back.