]> cat aescling's git repositories - mastodon.git/commitdiff
Default puma to running on localhost only. (#8429)
authorM Somerville <dracos@users.noreply.github.com>
Sat, 25 Aug 2018 19:24:20 +0000 (20:24 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 25 Aug 2018 19:24:20 +0000 (21:24 +0200)
config/puma.rb

index 0397b892048588048784cf95181d61d560f4ed05..d31ae40c886dd5c601b63771fee03ba158c4a304 100644 (file)
@@ -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' }