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

Deprecate support for using `HOST` environment to specify server IP #32540

Merged
merged 1 commit into from Apr 16, 2018

Conversation

@y-yagi
Copy link
Member

@y-yagi y-yagi commented Apr 12, 2018

At SuSE, $HOST is set by default and is equal to $HOSTNAME.
https://www.suse.com/documentation/sled11/book_sle_admin/data/sec_adm_variables.html

Therefore, by default, it binds to hostname instead of localhost. This seems not to be appropriate as default behavior.

In order to avoid the name of the environment variable being used, changed the environment variable from HOST to BINDING.

Fixes #29516.

railties/lib/rails/commands/server/server_command.rb Outdated
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Using the `HOST` environment to specify the IP is deprecated and will be removed in Rails 6.1.
Please use `BINDING` environment instead.
MSG

This comment has been minimized.

@matthewd

matthewd Apr 12, 2018
Member

For a smoother upgrade path, I think this should only complain if BINDING is not set

This comment has been minimized.

@y-yagi

y-yagi Apr 16, 2018
Author Member

Good call. I fixed, thanks!

At SuSE, `$HOST` is set by default and is equal to `$HOSTNAME`.
https://www.suse.com/documentation/sled11/book_sle_admin/data/sec_adm_variables.html

Therefore, by default, it binds to hostname instead of `localhost`.
This seems not to be appropriate as default behavior.

In order to avoid the name of the environment variable being used,
I changed the environment variable from `HOST` to `BINDING`.

Fixes #29516.
@y-yagi y-yagi force-pushed the y-yagi:fix_29516 branch to 40a305e Apr 15, 2018
@y-yagi y-yagi merged commit 37b373a into rails:master Apr 16, 2018
2 checks passed
2 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@y-yagi y-yagi deleted the y-yagi:fix_29516 branch Apr 16, 2018
pudiva added a commit to alphagov/govuk-docker that referenced this pull request Jul 9, 2020
Rails 6 deprecated the HOST variable in favour of BINDING
See: rails/rails#32540
pudiva added a commit to alphagov/govuk-docker that referenced this pull request Jul 9, 2020
Rails 6 deprecated the HOST variable in favour of BINDING
See: rails/rails#32540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.