diff --git a/configuration.go b/configuration.go index ae528c492..4dfa40115 100644 --- a/configuration.go +++ b/configuration.go @@ -93,7 +93,7 @@ func (ep *EntryPoints) String() string { // Set's argument is a string to be parsed to set the flag. // It's a comma-separated list, so we split it. func (ep *EntryPoints) Set(value string) error { - regex := regexp.MustCompile("(?:Name:(?P\\S*))\\s*(?:Address:(?P
\\S*))?\\s*(?:TLS:(?P\\S*))?\\s*(?:Redirect.EntryPoint:(?P\\S*))?\\s*(?:Redirect.Regex:(?P\\S*))?\\s*(?:Redirect.Replacement:(?P\\S*))?") + regex := regexp.MustCompile("(?:Name:(?P\\S*))\\s*(?:Address:(?P
\\S*))?\\s*(?:TLS:(?P\\S*))?\\s*((?PTLS))?\\s*(?:Redirect.EntryPoint:(?P\\S*))?\\s*(?:Redirect.Regex:(?P\\S*))?\\s*(?:Redirect.Replacement:(?P\\S*))?") match := regex.FindAllStringSubmatch(value, -1) if match == nil { return errors.New("Bad EntryPoints format: " + value) @@ -114,6 +114,10 @@ func (ep *EntryPoints) Set(value string) error { tls = &TLS{ Certificates: certs, } + } else if len(result["TLSACME"]) > 0 { + tls = &TLS{ + Certificates: Certificates{}, + } } var redirect *Redirect if len(result["RedirectEntryPoint"]) > 0 || len(result["RedirectRegex"]) > 0 || len(result["RedirectReplacement"]) > 0 {