In Eclipse Vert.x, while using Vert.x Web, applying session handler to the router, allows us to access the session using RoutingContext, in the handler. Is there any way we can access the session using ProxyContext, which is used in ProxyInterceptor implementation?
Assuming the request handed over to the proxy has been processed by the Router
first, you can cast it to WebServerRequest
:
ProxyRequest proxyRequest = proxyContext.request();
WebServerRequest webServerRequest = (WebServerRequest) proxyRequest.proxiedRequest();
RoutingContext routingContext = webServerRequest.routingContext();
Session session = routingContext.session();