Skip to content

Commit

Permalink
fix: either http_interface of http_bind_address can be specified (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
blz-ea authored Jan 4, 2021
1 parent 5b3aea9 commit 17601a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions multistep/commonsteps/http_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (c *HTTPConfig) Prepare(ctx *interpolate.Context) []error {
c.HTTPPortMax = 9000
}

if c.HTTPInterface != "" && c.HTTPAddress != "" {
errs = append(errs,
errors.New("either http_interface or http_bind_address can be specified"))
}

if c.HTTPAddress == "" {
c.HTTPAddress = "0.0.0.0"
}
Expand All @@ -61,10 +66,5 @@ func (c *HTTPConfig) Prepare(ctx *interpolate.Context) []error {
errors.New("http_port_min must be less than http_port_max"))
}

if c.HTTPInterface != "" && c.HTTPAddress == "0.0.0.0" {
errs = append(errs,
errors.New("either http_interface of http_bind_address can be specified"))
}

return errs
}

0 comments on commit 17601a2

Please # to comment.