Check weaveDNS subdomain on REST PUT
This commit is contained in:
1 parent
94d7f33a03
commit
7408f72de2
1 file changed
+5
@@ -35,6 +35,11 @@ func (n *Nameserver) HandleHTTP(router *mux.Router, dockerCli *docker.Client) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !dns.IsSubDomain(n.domain, hostname) {
|
||||||
|
n.infof("Ignoring registration %s %s %s (not a subdomain of %s)", hostname, ipStr, container, n.domain)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if err := n.AddEntry(hostname, container, n.ourName, ip); err != nil {
|
if err := n.AddEntry(hostname, container, n.ourName, ip); err != nil {
|
||||||
n.badRequest(w, fmt.Errorf("Unable to add entry: %v", err))
|
n.badRequest(w, fmt.Errorf("Unable to add entry: %v", err))
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in new issue
Block a user