Removing confusing variable from getDNSDomain, just return "" when disabled

This commit is contained in:
Paul Bellamy committed 2015-09-22 15:09:32 +01:00
1 parent 3e4d8a3ffe
commit 547c9e7f5a
3 files changed
+9 -7

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
}
}
hostname = i.proxy.hostnameMatchRegexp.ReplaceAllString(hostname, i.proxy.HostnameReplacement)
if dnsDomain, withDNS := i.proxy.getDNSDomain(); withDNS {
if dnsDomain := i.proxy.getDNSDomain(); dnsDomain != "" {
i.setHostname(&container, hostname, dnsDomain)
if err := i.proxy.setWeaveDNS(container.HostConfig, container.Hostname, dnsDomain); err != nil {
return err