forked from platypush/platypush
Missed SSL flag
This commit is contained in:
parent
3eed774d50
commit
a77a9c04b7
2 changed files with 3 additions and 2 deletions
|
@ -271,7 +271,8 @@ class HttpBackend(Backend):
|
||||||
enabled_plugins[plugin] = conf
|
enabled_plugins[plugin] = conf
|
||||||
|
|
||||||
return render_template('index.html', plugins=enabled_plugins, hidden_plugins=hidden_plugins,
|
return render_template('index.html', plugins=enabled_plugins, hidden_plugins=hidden_plugins,
|
||||||
token=Config.get('token'), websocket_port=self.websocket_port)
|
token=Config.get('token'), websocket_port=self.websocket_port,
|
||||||
|
has_ssl=self.ssl_cert is not None)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/widget/<widget>', methods=['POST'])
|
@app.route('/widget/<widget>', methods=['POST'])
|
||||||
|
|
|
@ -9,7 +9,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
var initWebsocket = function() {
|
var initWebsocket = function() {
|
||||||
try {
|
try {
|
||||||
url_prefix = window.ssl_cert ? 'wss://' : 'ws://';
|
url_prefix = window.has_ssl ? 'wss://' : 'ws://';
|
||||||
websocket = new WebSocket(url_prefix + window.location.hostname + ':' + window.websocket_port);
|
websocket = new WebSocket(url_prefix + window.location.hostname + ':' + window.websocket_port);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
websocket = undefined;
|
websocket = undefined;
|
||||||
|
|
Loading…
Reference in a new issue