diff options
| -rw-r--r-- | res/templates/index.html | 2 | ||||
| -rw-r--r-- | src/client/rz_api_backend.js | 5 | ||||
| -rw-r--r-- | src/client/rz_mesh.js | 4 |
3 files changed, 2 insertions, 9 deletions
diff --git a/res/templates/index.html b/res/templates/index.html index 6ae505b8..a0107906 100644 --- a/res/templates/index.html +++ b/res/templates/index.html @@ -14,8 +14,6 @@ var rz_config = { // set as a global variable 'rand_id_generator' : 'hash', 'rzdoc_cur__name': "{{ rz_config__rzdoc_cur__name|safe }}", 'rzdoc__mainpage_name': '{{ rz_config__rzdoc__mainpage_name }}', - 'rz_server_host': '{{ rz_config__hostname }}', - 'rz_server_port': '{{ rz_config__port }}', 'separator_string': ' ', }; diff --git a/src/client/rz_api_backend.js b/src/client/rz_api_backend.js index 416e9708..9401e6f1 100644 --- a/src/client/rz_api_backend.js +++ b/src/client/rz_api_backend.js @@ -7,10 +7,7 @@ define(['util', 'model/core'], function(util, model_core) { function RZ_API_Backend() { - var rz_server_url = 'http://%h:%p'; - rz_server_url = rz_server_url.replace('%h', rz_config.rz_server_host); - rz_server_url = rz_server_url.replace('%p', rz_config.rz_server_port); - + var rz_server_url = document.location.origin; var common_req_ctx = function() { var common_ctx = { rzdoc_name: rz_config.rzdoc_cur__name }; // FIXME: call rz_core.rzdoc_get_current + avoid requirejs circular dep 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; |
