Fixed relative URL to sockjs endpoint, wasn't yet using the proper base url
Generated URLs now take X-Forwarded-Host header sent by proxies into account for included host and port