Fix postLoadConfig

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge
2017-04-07 15:48:58 +02:00
parent fba3db5291
commit 40afd641a9
+5 -4
View File
@@ -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)