summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-05 20:53:55 +0200
committerGitHub <noreply@github.com>2020-04-05 20:53:55 +0200
commitbdc86c8464139494b67faaa68ac3dae64359c8e8 (patch)
tree7e3084bc6788ad9db87f3d5722b739752b5325cc /applications
parente994f8ae31fa3e4143c379ffe4ffa449b949d67a (diff)
parentfe51dbe735d882323af39acda2e818321d85a19e (diff)
Merge pull request #3847 from ysc3839/ttyd
luci-app-ttyd: use correct http protocol
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js b/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js
index 26756a3692..965f827720 100644
--- a/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js
+++ b/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js
@@ -7,12 +7,13 @@ return view.extend({
return uci.load('ttyd');
},
render: function() {
- var port = uci.get_first('ttyd', 'ttyd', 'port') || '7681';
+ var port = uci.get_first('ttyd', 'ttyd', 'port') || '7681',
+ ssl = uci.get_first('ttyd', 'ttyd', 'ssl') || '0';
if (port === '0')
return E('div', { class: 'alert-message warning' },
_('Random ttyd port (port=0) is not supported.<br>Change to a fixed port and try again.'));
return E('iframe', {
- src: window.location.protocol + '//' + window.location.hostname + ':' + port,
+ src: (ssl === '1' ? 'https' : 'http') + '://' + window.location.hostname + ':' + port,
style: 'width: 100%; min-height: 500px; border: none; border-radius: 3px; resize: vertical;'
});
},