diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-15 05:56:35 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-07-16 16:10:19 +0200 |
commit | be053560e98dc9b702ee347518994e0b07914fae (patch) | |
tree | 46ade3ab73effd3ba8ace831057b5c1f67a5eed9 | |
parent | 5ccd011cc3bafc00a557dabbb47da004f3d4a381 (diff) |
Change default interface of web and streaming from 0.0.0.0 to 127.0.0.1 (#11302)
-rw-r--r-- | config/puma.rb | 4 | ||||
-rw-r--r-- | docker-compose.yml | 2 | ||||
-rw-r--r-- | streaming/index.js | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/config/puma.rb b/config/puma.rb index 1afdb1c6d..25a5534b2 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -2,9 +2,9 @@ threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i threads threads_count, threads_count if ENV['SOCKET'] - bind 'unix://' + ENV['SOCKET'] + bind "unix://#{ENV['SOCKET']}" else - port ENV.fetch('PORT') { 3000 } + bind "tcp://127.0.0.1:#{ENV.fetch('PORT', 3000)}" end environment ENV.fetch('RAILS_ENV') { 'development' } diff --git a/docker-compose.yml b/docker-compose.yml index 93d47f1a0..f3fe6cfd0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,7 +58,7 @@ services: image: tootsuite/mastodon restart: always env_file: .env.production - command: yarn start + command: BIND=0.0.0.0 node ./streaming networks: - external_network - internal_network diff --git a/streaming/index.js b/streaming/index.js index b016c45f1..12e4e3ab1 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -678,7 +678,7 @@ const attachServerWithConfig = (server, onSuccess) => { } }); } else { - server.listen(+process.env.PORT || 4000, process.env.BIND || '0.0.0.0', () => { + server.listen(+process.env.PORT || 4000, process.env.BIND || '127.0.0.1', () => { if (onSuccess) { onSuccess(`${server.address().address}:${server.address().port}`); } |