dynamically change socket urls based on current url, to fix port issue