From cf58acda302c766b99c67cfc81fa18428fba13fb Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Sun, 3 May 2015 15:01:00 -0700 Subject: [PATCH] Clean up commit f366325b3ba596989ce45f55d36bed8ac6409de3 a bit --- CHANGELOG.md | 1 + middleman-core/lib/middleman-core/preview_server.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d10c5e35..61f381d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ master === * The preview server can now serve over HTTPS using the `--https` flag. It will use an automatic self-signed cert which can be overridden using `--ssl_certificate` and `--ssl_private_key`. These settings can also be set in `config.rb` +* The preview server URL will use 'localhost' rather than '0.0.0.0'. 3.3.11 === diff --git a/middleman-core/lib/middleman-core/preview_server.rb b/middleman-core/lib/middleman-core/preview_server.rb index 5ad4bb72..7a4c1282 100644 --- a/middleman-core/lib/middleman-core/preview_server.rb +++ b/middleman-core/lib/middleman-core/preview_server.rb @@ -267,7 +267,7 @@ module Middleman # Returns the URI the preview server will run on # @return [URI] def uri - host = @host.eql?('0.0.0.0') ? 'localhost' : @host + host = @host == '0.0.0.0' ? 'localhost' : @host scheme = https? ? 'https' : 'http' URI("#{scheme}://#{host}:#{@port}") end