Remove the trailing dot if the domain is not defined.

This commit is contained in:
Ludovic Fernandez 2018-10-23 17:36:05 +02:00 committed by Traefiker Bot
parent 638960284e
commit c7df82e695
8 changed files with 46 additions and 15 deletions

View file

@ -222,8 +222,11 @@ func (p *Provider) getFrontendRule(task taskData) string {
}
domain := label.GetStringValue(task.TraefikLabels, label.TraefikDomain, p.Domain)
if len(domain) > 0 {
domain = "." + domain
}
return "Host:" + p.getSegmentSubDomain(task) + "." + domain
return "Host:" + p.getSegmentSubDomain(task) + domain
}
func (p *Provider) getServers(tasks []taskData) map[string]types.Server {