From 40afd641a9488db6b02a09d8eaf18eaa1e935d5b Mon Sep 17 00:00:00 2001 From: Emile Vauge Date: Fri, 7 Apr 2017 15:48:58 +0200 Subject: [PATCH] Fix postLoadConfig Signed-off-by: Emile Vauge --- server.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server.go b/server.go index 2ee11581c..079be3d8a 100644 --- a/server.go +++ b/server.go @@ -311,15 +311,16 @@ func (server *Server) postLoadConfig() { for _, frontend := range configuration.Frontends { // check if one of the frontend entrypoints is configured with TLS - TLSEnabled := false + // and is configured with ACME + ACMEEnabled := false for _, entrypoint := range frontend.EntryPoints { - if server.globalConfiguration.EntryPoints[entrypoint].TLS != nil { - TLSEnabled = true + if server.globalConfiguration.ACME.EntryPoint == entrypoint && server.globalConfiguration.EntryPoints[entrypoint].TLS != nil { + ACMEEnabled = true break } } - if TLSEnabled { + if ACMEEnabled { for _, route := range frontend.Routes { rules := Rules{} domains, err := rules.ParseDomains(route.Rule)