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`).
This commit is contained in:
Simon Ser 2020-09-09 13:18:18 +02:00
parent 758cac1f77
commit f4d13a4101
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 6 deletions

View File

@ -44,12 +44,7 @@ func parseFrontend(srv *Server, d *Directive) error {
} }
var listenNames []string var listenNames []string
for _, listenDirective := range d.ChildrenByName("listen") { for _, listenAddr := range d.Params {
var listenAddr string
if err := listenDirective.ParseParams(&listenAddr); err != nil {
return err
}
host, port, err := net.SplitHostPort(listenAddr) host, port, err := net.SplitHostPort(listenAddr)
if err != nil { if err != nil {
return fmt.Errorf("failed to parse listen address %q: %v", listenAddr, err) return fmt.Errorf("failed to parse listen address %q: %v", listenAddr, err)