plugin/etcd: make the address of upstream optional (#2262)

Automatically submitted.
This commit is contained in:
Jiacheng Xu
2018-11-02 20:52:12 +01:00
committed by corbot[bot]
parent 05204ef142
commit 1a01e13db8
2 changed files with 14 additions and 3 deletions

View File

@@ -92,9 +92,6 @@ func etcdParse(c *caddy.Controller) (*Etcd, bool, error) {
endpoints = args
case "upstream":
args := c.RemainingArgs()
if len(args) == 0 {
return nil, false, c.ArgErr()
}
u, err := upstream.New(args)
if err != nil {
return nil, false, err