mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated support for using the HOST
environment variable to specify the server IP
This commit is contained in:
parent
5a7028a1a5
commit
c0728ad321
4 changed files with 6 additions and 18 deletions
|
@ -41,6 +41,8 @@ Please refer to the [Changelog][railties] for detailed changes.
|
|||
|
||||
* Remove deprecated `server` argument from the rails server command.
|
||||
|
||||
* Remove deprecated support for using the `HOST` environment variable to specify the server IP.
|
||||
|
||||
### Deprecations
|
||||
|
||||
### Notable changes
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
* Remove deprecated support for using the `HOST` environment variable to specify the server IP.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove deprecated `server` argument from the rails server command.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
|
|
@ -220,15 +220,6 @@ module Rails
|
|||
else
|
||||
default_host = environment == "development" ? "localhost" : "0.0.0.0"
|
||||
|
||||
if ENV["HOST"] && !ENV["BINDING"]
|
||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||
Using the `HOST` environment variable to specify the IP is deprecated and will be removed in Rails 6.1.
|
||||
Please use `BINDING` environment variable instead.
|
||||
MSG
|
||||
|
||||
return ENV["HOST"]
|
||||
end
|
||||
|
||||
ENV.fetch("BINDING", default_host)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -96,15 +96,6 @@ class Rails::Command::ServerCommandTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_environment_with_host
|
||||
switch_env "HOST", "1.2.3.4" do
|
||||
assert_deprecated do
|
||||
options = parse_arguments
|
||||
assert_equal "1.2.3.4", options[:Host]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_environment_with_binding
|
||||
switch_env "BINDING", "1.2.3.4" do
|
||||
options = parse_arguments
|
||||
|
|
Loading…
Reference in a new issue