vertx-http-proxy icon indicating copy to clipboard operation
vertx-http-proxy copied to clipboard

Variable from interceptor to originSelector

Open zenios opened this issue 2 years ago • 3 comments

Sometimes we might want to assign a variable inside an interceptor that will help the origin selector to decide the actual origin. What is the optimal way to do these as of now. I searched and could not find anything

zenios avatar Apr 19 '22 17:04 zenios

This is really a good question. I think setting the origin selector to return request options can solve the problem. originSelector(Function<HttpServerRequest, Future<RequestOptions>> selector)

dinstone avatar Oct 12 '22 14:10 dinstone

I think we could resolve the origin server before the interceptors kick-in and then it would be exposed in the ProxyContext and can be overriden, or something like that .

vietj avatar Nov 15 '22 17:11 vietj

sometimes the ProxyContext is not available for a resolution, e.g in the WebSocket case, so we need to come with an interface that provides similar info for this case

vietj avatar Feb 17 '23 09:02 vietj