HFS plugin to proxy configured paths to other servers
HFS ~ HTTP File Server https://github.com/rejetto/hfs
On every forwarded request, this plugin is calling customApi reverseproxy_forward
.
If your code/plugin exports this customApi, you can interact with it.
exports.customApi = {
reverseproxy_forward({ forward, ctx }) {
// here you can see and modify the request we are about to forward
console.log(forward)
// forward is an object { url, method, headers, body }
// if you change its content, it will affect forwarded request.
}
}