I am trying to change the hub connection url in signalR so that all requests go through my custom load balancer.
The load balancer then redirects to original signalR web application and gives the response.
For this i am trying to create a new hub connection by changing the url like this
var signalR = $.signalR;
signalR.hub = $.hubConnection("http://localhost:64071/LoadBalancer.Web/NotificationWeb/signalr", { useDefaultPath: false });
The signalR tries to connect to this URL and in the negotiate request returns this response
{ "Url":"/WE.abcd.Web/signalr", "ConnectionToken":"raYdZtwHWMP50fYIxa4MxRtR8xZAmUhhdlXreYVlB3Meo+2VeZSk4wMEdbkCbVEAzo/+gFyNofqV ......
Then as you can see in the response, the URL contains original URL (i.e. WE.abc.web) so the communications happens directly to WE.abcd.Web instead of passing through my Load Balancer. Web even after overriding the URLs.
How can i force the negotiate request to return me the LoadBalancer.Web URL instead of original URL?