diff --git a/container-start.sh b/container-start.sh index 81338503a..9f28d0127 100755 --- a/container-start.sh +++ b/container-start.sh @@ -17,9 +17,6 @@ sedeasy() { } # Configure -[ -n "$USE_SSL" ] && echo "Using secure websockets: $USE_SSL" \ - && sedeasy "useSecureWebsockets: [^,]*," "useSecureWebsockets: ${USE_SSL}," cfg/config.js - [ -n "$STORAGE" ] && echo "Using storage adapter: $STORAGE" \ && sedeasy "storage: [^,]*," "storage: ${STORAGE}," cfg/config.js diff --git a/server.js b/server.js index c47c4e450..acee1c499 100644 --- a/server.js +++ b/server.js @@ -13,9 +13,6 @@ var nThen = require("nthen"); var config = require("./lib/load-config"); -var websocketPort = config.websocketPort || config.httpPort; -var useSecureWebsockets = config.useSecureWebsockets || false; - // This is stuff which will become available to replify const debuggableStore = new WeakMap(); const debuggable = function (name, x) { @@ -211,9 +208,6 @@ app.get('/api/config', function(req, res){ removeDonateButton: (config.removeDonateButton === true), allowSubscriptions: (config.allowSubscriptions === true), websocketPath: config.useExternalWebsocket ? undefined : config.websocketPath, - // FIXME don't send websocketURL if websocketPath is provided. deprecated. - websocketURL:'ws' + ((useSecureWebsockets) ? 's' : '') + '://' + host + ':' + - websocketPort + '/cryptpad_websocket', httpUnsafeOrigin: config.httpUnsafeOrigin.replace(/^\s*/, ''), adminEmail: config.adminEmail, adminKeys: admins, @@ -327,10 +321,6 @@ var nt = nThen(function (w) { historyKeeper = HK.create(hkConfig); }).nThen(function () { if (config.useExternalWebsocket) { return; } - if (websocketPort !== config.httpPort) { - log.debug("setting up a new websocket server"); - wsConfig = { port: websocketPort}; - } var wsSrv = new WebSocketServer(wsConfig); NetfluxSrv.run(wsSrv, config, historyKeeper); }); diff --git a/www/common/outer/network-config.js b/www/common/outer/network-config.js index 300810b97..ff4c22870 100644 --- a/www/common/outer/network-config.js +++ b/www/common/outer/network-config.js @@ -4,7 +4,6 @@ define([ var Config = {}; Config.getWebsocketURL = function (origin) { - if (!ApiConfig.websocketPath) { return ApiConfig.websocketURL; } var path = ApiConfig.websocketPath; if (/^ws{1,2}:\/\//.test(path)) { return path; }