unify websocket configuration points

pull/1/head
ansuz 5 years ago
parent a8b363dba0
commit 05699b2c94

@ -1,3 +1,17 @@
# J release (3.9.0)
## Goals
* simplify server configuration by dropping support for unused features
* drop `websocketPath` `websocketURL` and `useExternalWebsockets`
* use `externalWebsocketURL` to replace all of these
## Update notes
## Features
## Bug fixes
# IsolobodonPortoricensis release (3.8.0) # IsolobodonPortoricensis release (3.8.0)
We had some trouble finding an extinct animal whose name started with "I", and we had to resort to using a scientific name. We had some trouble finding an extinct animal whose name started with "I", and we had to resort to using a scientific name.

@ -107,7 +107,7 @@ module.exports = {
* Otherwise, leave this commented and your clients will use the default * Otherwise, leave this commented and your clients will use the default
* websocket (wss://yourdomain.com/cryptpad_websocket) * websocket (wss://yourdomain.com/cryptpad_websocket)
*/ */
//externalWebsocketPath: 'wss://api.yourdomain.com/cryptpad_websocket //externalWebsocketURL: 'wss://api.yourdomain.com/cryptpad_websocket
/* CryptPad can be configured to send customized HTTP Headers /* CryptPad can be configured to send customized HTTP Headers
* These settings may vary widely depending on your needs * These settings may vary widely depending on your needs

@ -166,7 +166,7 @@ app.get('/api/config', function(req, res){
}, },
removeDonateButton: (config.removeDonateButton === true), removeDonateButton: (config.removeDonateButton === true),
allowSubscriptions: (config.allowSubscriptions === true), allowSubscriptions: (config.allowSubscriptions === true),
websocketPath: config.externalWebsocketPath, websocketPath: config.externalWebsocketURL,
httpUnsafeOrigin: config.httpUnsafeOrigin.replace(/^\s*/, ''), httpUnsafeOrigin: config.httpUnsafeOrigin.replace(/^\s*/, ''),
adminEmail: config.adminEmail, adminEmail: config.adminEmail,
adminKeys: admins, adminKeys: admins,
@ -234,7 +234,7 @@ var nt = nThen(function (w) {
log = config.log = _log; log = config.log = _log;
})); }));
}).nThen(function (w) { }).nThen(function (w) {
if (config.externalWebsocketPath) { if (config.externalWebsocketURL) {
// if you plan to use an external websocket server // if you plan to use an external websocket server
// then you don't need to load any API services other than the logger. // then you don't need to load any API services other than the logger.
// Just abort. // Just abort.

Loading…
Cancel
Save