From 916246120a5da8dafaa4ba6dcfa21c9d378d3a06 Mon Sep 17 00:00:00 2001 From: Robert Bost Date: Tue, 12 Dec 2017 19:29:16 -0500 Subject: [PATCH] Update websocket URL so proxy port can be utilized. Resolves #1421. --- evennia/settings_default.py | 6 +++--- evennia/web/webclient/templates/webclient/base.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/evennia/settings_default.py b/evennia/settings_default.py index b1e2a7a79e..9a0ec3ffa3 100644 --- a/evennia/settings_default.py +++ b/evennia/settings_default.py @@ -89,9 +89,9 @@ WEBSOCKET_CLIENT_PORT = 4005 WEBSOCKET_CLIENT_INTERFACE = '0.0.0.0' # Actual URL for webclient component to reach the websocket. You only need # to set this if you know you need it, like using some sort of proxy setup. -# If given it must be on the form "ws://hostname" (WEBSOCKET_CLIENT_PORT will -# be automatically appended). If left at None, the client will itself -# figure out this url based on the server's hostname. +# If given it must be on the form "ws[s]://hostname[:port]". If left at None, +# the client will itself figure out this url based on the server's hostname. +# e.g. ws://external.example.com or wss://external.example.com:443 WEBSOCKET_CLIENT_URL = None # This determine's whether Evennia's custom admin page is used, or if the # standard Django admin is used. diff --git a/evennia/web/webclient/templates/webclient/base.html b/evennia/web/webclient/templates/webclient/base.html index 373ff0f357..30a68c498f 100644 --- a/evennia/web/webclient/templates/webclient/base.html +++ b/evennia/web/webclient/templates/webclient/base.html @@ -44,7 +44,7 @@ JQuery available. {% endif %} {% if websocket_url %} - var wsurl = "{{websocket_url}}:{{websocket_port}}"; + var wsurl = "{{websocket_url}}"; {% else %} var wsurl = "ws://" + this.location.hostname + ":{{websocket_port}}"; {% endif %}