aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2015-04-29 22:30:03 -0600
committerMatthew Holt <[email protected]>2015-04-29 22:30:03 -0600
commit3bc4e84ed3b2adcedd71e661e305c2394d41fc86 (patch)
treede11180e861143c5a219d2c8b462ccb1276d5b0f
parent60beddf6c8186ef06e5a50d03cf0fdb9d811be59 (diff)
downloadcaddy-3bc4e84ed3b2adcedd71e661e305c2394d41fc86.tar.gz
caddy-3bc4e84ed3b2adcedd71e661e305c2394d41fc86.zip
Default host is now 0.0.0.0 (wildcard)
Doesn't break using localhost to access the site
-rw-r--r--config/config.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/config/config.go b/config/config.go
index e27f27254..f069f4f05 100644
--- a/config/config.go
+++ b/config/config.go
@@ -11,7 +11,7 @@ import (
)
const (
- DefaultHost = "localhost"
+ DefaultHost = "0.0.0.0"
DefaultPort = "2015"
DefaultRoot = "."
@@ -19,8 +19,11 @@ const (
DefaultConfigFile = "Caddyfile"
)
-// Port is configurable via command line flag
-var Port = DefaultPort
+// Host and Port are configurable via command line flag
+var (
+ Host = DefaultHost
+ Port = DefaultPort
+)
// config represents a server configuration. It
// is populated by parsing a config file (via the
@@ -117,7 +120,7 @@ func Default() []Config {
cfg := []Config{
Config{
Root: DefaultRoot,
- Host: DefaultHost,
+ Host: Host,
Port: Port,
},
}