mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix websocket only binds to localhost #1182
This commit is contained in:
parent
22747cb380
commit
650e4c42ca
@ -599,9 +599,9 @@ app.use(function (err, req, res /*, next*/) {
|
||||
var server = Http.createServer(app);
|
||||
|
||||
nThen(function (w) {
|
||||
server.listen(Env.httpPort, w());
|
||||
server.listen(Env.httpPort, Env.httpAddress, w());
|
||||
if (Env.httpSafePort) {
|
||||
server.listen(Env.httpSafePort, w());
|
||||
server.listen(Env.httpSafePort, Env.httpAddress, w());
|
||||
}
|
||||
server.on('upgrade', function (req, socket, head) {
|
||||
// TODO warn admins that websockets should only be proxied in this way in a dev environment
|
||||
|
||||
@ -81,7 +81,7 @@ nThen(function (w) {
|
||||
process.exit(1);
|
||||
}
|
||||
Env.httpServer = Http.createServer(app);
|
||||
Env.httpServer.listen(Env.websocketPort, 'localhost', w(function () {
|
||||
Env.httpServer.listen(Env.websocketPort, Env.httpAddress, w(function () {
|
||||
Env.Log.info('WEBSOCKET_LISTENING', {
|
||||
port: Env.websocketPort,
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user