From f4d13a41014ae7676445563321e0a85f81b34b23 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 9 Sep 2020 13:18:18 +0200 Subject: [PATCH] Remove listen directive The name is misleading, because we're doing some magic to figure out what server name to obtain a certificate for. In other words, `listen example.org:443` would actually listen without binding to a particular IP address (same as `listen :443`). --- main.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main.go b/main.go index d1ea285..884d796 100644 --- a/main.go +++ b/main.go @@ -44,12 +44,7 @@ func parseFrontend(srv *Server, d *Directive) error { } var listenNames []string - for _, listenDirective := range d.ChildrenByName("listen") { - var listenAddr string - if err := listenDirective.ParseParams(&listenAddr); err != nil { - return err - } - + for _, listenAddr := range d.Params { host, port, err := net.SplitHostPort(listenAddr) if err != nil { return fmt.Errorf("failed to parse listen address %q: %v", listenAddr, err)