Mutate proxy.target_url from JSVM middleware

Is there anyway to mutate the proxy.target_url from middleware?

I have the need to define an API that supports this

http://my-es-host/[target-backend]/[api-path]

So based on target-backend, my proxy.target_url would change to http://$target-backend-value/$api-path instead of a hardwired one

I don;t think this is supported in the JSVM yet, you can only change the path, if you change the hostname it will be ignored. The only place a new target host can be include is in the URL Re-writer.

k, added a request for this Mutate proxy.target_url from JSVM middleware · Issue #960 · TykTechnologies/tyk · GitHub