Don't always run check on root domain

This commit is contained in:
Mike Cheng 2015-05-06 11:23:27 -04:00
parent c1746de8eb
commit af0f516a46

View file

@ -14,12 +14,12 @@ import (
var wg sync.WaitGroup var wg sync.WaitGroup
func contains(c api.Config, val string) bool { func contains(c api.Config, val string) bool {
if val == c.Domain {
return true
}
for _, v := range c.Hostnames { for _, v := range c.Hostnames {
if fmt.Sprintf("%s.%s", v, c.Domain) == val { // We have a special case where an empty hostname
// is equivalent to the domain (i.e. val == domain).
if val == c.Domain && v == "" {
return true
} else if fmt.Sprintf("%s.%s", v, c.Domain) == val {
return true return true
} }
} }