From 01896d770d9e3c08676a11d6e6c0e4c8ea5d1a0f Mon Sep 17 00:00:00 2001 From: M Somerville Date: Sat, 25 Aug 2018 20:24:20 +0100 Subject: [PATCH] Default puma to running on localhost only. (#8429) --- config/puma.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/puma.rb b/config/puma.rb index 0397b89204..d31ae40c88 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -4,7 +4,8 @@ threads threads_count, threads_count if ENV['SOCKET'] then bind 'unix://' + ENV['SOCKET'] else - port ENV.fetch('PORT') { 3000 } + port_num = ENV.fetch('PORT') { 3000 } + bind "tcp://127.0.0.1:#{port_num}" end environment ENV.fetch('RAILS_ENV') { 'development' }