From d9455e3f9becca5d95b2a05929c4abed08a4449d Mon Sep 17 00:00:00 2001 From: Tad Wang Date: Thu, 7 Jan 2016 15:59:57 +0800 Subject: [PATCH] fix wss issue when using https #37 --- jumpserver/views.py | 4 ++-- templates/exec_cmd.html | 8 +++++++- templates/jlog/web_terminal.html | 7 ++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/jumpserver/views.py b/jumpserver/views.py index 766ae021f..afe5ddd38 100644 --- a/jumpserver/views.py +++ b/jumpserver/views.py @@ -344,7 +344,7 @@ def download(request): def exec_cmd(request): role = request.GET.get('role') check_assets = request.GET.get('check_assets', '') - web_terminal_uri = 'ws://%s/exec?role=%s' % (WEB_SOCKET_HOST, role) + web_terminal_uri = '%s/exec?role=%s' % (WEB_SOCKET_HOST, role) return my_render('exec_cmd.html', locals(), request) @@ -356,7 +356,7 @@ def web_terminal(request): if asset: print asset hostname = asset.hostname - web_terminal_uri = 'ws://%s/terminal?id=%s&role=%s' % (WEB_SOCKET_HOST, asset_id, role_name) + web_terminal_uri = '%s/terminal?id=%s&role=%s' % (WEB_SOCKET_HOST, asset_id, role_name) return render_to_response('jlog/web_terminal.html', locals()) diff --git a/templates/exec_cmd.html b/templates/exec_cmd.html index 754105cee..d1eda2fcb 100644 --- a/templates/exec_cmd.html +++ b/templates/exec_cmd.html @@ -23,7 +23,13 @@