diff options
| author | Alon Levy <alon@pobox.com> | 2015-04-25 16:57:10 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-25 21:05:19 +0300 |
| commit | aafae6f846f533cedc4eab1857aab97395a0be31 (patch) | |
| tree | 6bf855e30da3ea0976b9ce3a4786714c047890be /src/client/rz_mesh.js | |
| parent | 0a20324e01210b6654c5f4415efd53d44c2c5246 (diff) | |
client: drop rz_server_{host,port}, use document.location
Since the client can be hidden from the server via multiple layers, be
they load balancers, proxies or iptable rules, it is simpler to not have
the server aware of those layers and have to inform the client of them,
instead use information the client already has.
Diffstat (limited to 'src/client/rz_mesh.js')
| -rw-r--r-- | src/client/rz_mesh.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client/rz_mesh.js b/src/client/rz_mesh.js index e2156c7a..82ddc3b3 100644 --- a/src/client/rz_mesh.js +++ b/src/client/rz_mesh.js @@ -5,9 +5,7 @@ */ define([ 'util', 'model/diff', 'model/util', 'socketio'], function(util, model_diff, model_util, io) { - var ws_server_url = 'http://%h:%p/graph'; // socketio namespace - ws_server_url = ws_server_url.replace('%h', rz_config.rz_server_host); - ws_server_url = ws_server_url.replace('%p', rz_config.rz_server_port); + var ws_server_url = document.location.origin + '/graph'; // socketio namespace var socket; var rz_mesh_graph_ref; |
