Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should not bind option in config.ru override other setups? #606

Closed
ghost opened this issue Nov 21, 2014 · 1 comment
Closed

Should not bind option in config.ru override other setups? #606

ghost opened this issue Nov 21, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 21, 2014

If bind option is set in config.ru, puma will bind to both of:

  • default host:port, or one set in puma.rb
  • one given in config.ru

Specifically here
https://github.com/puma/puma/blob/master/lib/puma/configuration.rb#L101
it is adding one more bind option.

If one would need multiple binds, he could specify multiple bind options in config.ru.
But adding default bind while a explicit option given is kinda confusing.

Something like this:

binds = []
options.each do |key,val|
  if key.to_s[0,4] == "bind"
    binds << val
  end
end
binds.any? && @options[:binds] = binds

Makes sense?

@evanphx
Copy link
Member

evanphx commented Nov 24, 2014

Yup! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant