mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-20 22:52:58 -05:00
Default host is now 0.0.0.0 (wildcard)
Doesn't break using localhost to access the site
This commit is contained in:
parent
60beddf6c8
commit
3bc4e84ed3
1 changed files with 7 additions and 4 deletions
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DefaultHost = "localhost"
|
DefaultHost = "0.0.0.0"
|
||||||
DefaultPort = "2015"
|
DefaultPort = "2015"
|
||||||
DefaultRoot = "."
|
DefaultRoot = "."
|
||||||
|
|
||||||
|
@ -19,8 +19,11 @@ const (
|
||||||
DefaultConfigFile = "Caddyfile"
|
DefaultConfigFile = "Caddyfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Port is configurable via command line flag
|
// Host and Port are configurable via command line flag
|
||||||
var Port = DefaultPort
|
var (
|
||||||
|
Host = DefaultHost
|
||||||
|
Port = DefaultPort
|
||||||
|
)
|
||||||
|
|
||||||
// config represents a server configuration. It
|
// config represents a server configuration. It
|
||||||
// is populated by parsing a config file (via the
|
// is populated by parsing a config file (via the
|
||||||
|
@ -117,7 +120,7 @@ func Default() []Config {
|
||||||
cfg := []Config{
|
cfg := []Config{
|
||||||
Config{
|
Config{
|
||||||
Root: DefaultRoot,
|
Root: DefaultRoot,
|
||||||
Host: DefaultHost,
|
Host: Host,
|
||||||
Port: Port,
|
Port: Port,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue