1
0
Fork 0

Enables the use of elements declared in other providers

This commit is contained in:
Gérald Croës 2019-01-15 05:28:04 -08:00 committed by Traefiker Bot
parent a79d6aa669
commit 8735263930
16 changed files with 753 additions and 94 deletions

View file

@ -76,28 +76,7 @@ func (s *Server) loadConfig(configurations config.Configurations) (map[string]ht
ctx := context.TODO()
// FIXME manage duplicates
conf := config.Configuration{
Routers: make(map[string]*config.Router),
Middlewares: make(map[string]*config.Middleware),
Services: make(map[string]*config.Service),
}
for _, config := range configurations {
for key, value := range config.Middlewares {
conf.Middlewares[key] = value
}
for key, value := range config.Services {
conf.Services[key] = value
}
for key, value := range config.Routers {
conf.Routers[key] = value
}
conf.TLS = append(conf.TLS, config.TLS...)
}
conf := mergeConfiguration(configurations)
handlers := s.applyConfiguration(ctx, conf)
// Get new certificates list sorted per entry points