mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
httpcaddyfile: Add default_bind global option (#4531)
This commit is contained in:
parent
93a7a45e7e
commit
1b7ff5d76c
3 changed files with 58 additions and 1 deletions
|
|
@ -213,7 +213,11 @@ func (st *ServerType) listenerAddrsForServerBlockKey(sblock serverBlock, key str
|
|||
lnHosts = append(lnHosts, cfgVal.Value.([]string)...)
|
||||
}
|
||||
if len(lnHosts) == 0 {
|
||||
lnHosts = []string{""}
|
||||
if defaultBind, ok := options["default_bind"].(string); ok {
|
||||
lnHosts = []string{defaultBind}
|
||||
} else {
|
||||
lnHosts = []string{""}
|
||||
}
|
||||
}
|
||||
|
||||
// use a map to prevent duplication
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue