1
0
Fork 0

Merge v1.4.1 into master

This commit is contained in:
Fernandez Ludovic 2017-10-25 11:15:50 +02:00
commit a0c72cdf00
24 changed files with 531 additions and 113 deletions

View file

@ -56,17 +56,9 @@ func goroutines() interface{} {
// Provide allows the provider to provide configurations to traefik
// using the given configuration channel.
func (provider *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *safe.Pool, _ types.Constraints) error {
systemRouter := mux.NewRouter()
if provider.Path == "" {
provider.Path = "/"
}
if provider.Path != "/" {
if provider.Path[len(provider.Path)-1:] != "/" {
provider.Path += "/"
}
systemRouter.Methods("GET").Path("/").HandlerFunc(func(response http.ResponseWriter, request *http.Request) {
http.Redirect(response, request, provider.Path, 302)
})