mirror of
https://github.com/traefik/traefik.git
synced 2025-09-29 01:31:13 +02:00
Fix postLoadConfig
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
69e081f40f
commit
ec245d604a
@ -315,15 +315,16 @@ func (server *Server) postLoadConfig() {
|
|||||||
for _, frontend := range configuration.Frontends {
|
for _, frontend := range configuration.Frontends {
|
||||||
|
|
||||||
// check if one of the frontend entrypoints is configured with TLS
|
// 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 {
|
for _, entrypoint := range frontend.EntryPoints {
|
||||||
if server.globalConfiguration.EntryPoints[entrypoint].TLS != nil {
|
if server.globalConfiguration.ACME.EntryPoint == entrypoint && server.globalConfiguration.EntryPoints[entrypoint].TLS != nil {
|
||||||
TLSEnabled = true
|
ACMEEnabled = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if TLSEnabled {
|
if ACMEEnabled {
|
||||||
for _, route := range frontend.Routes {
|
for _, route := range frontend.Routes {
|
||||||
rules := Rules{}
|
rules := Rules{}
|
||||||
domains, err := rules.ParseDomains(route.Rule)
|
domains, err := rules.ParseDomains(route.Rule)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user