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.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rails#29516.
@y-yagi y-yagi merged commit 37b373a into rails:master Apr 16, 2018
@y-yagi y-yagi deleted the fix_29516 branch April 16, 2018 05:35
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants