Skip to content

Commit

Permalink
Fix postLoadConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Emile Vauge <emile@vauge.com>
  • Loading branch information
emilevauge committed Apr 7, 2017
1 parent fba3db5 commit 40afd64
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 40afd64

Please sign in to comment.