Skip to content

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

@ghost

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions