fix healthcheck path
This commit is contained in:
parent
e3cac7d0e5
commit
de821fc305
4 changed files with 57 additions and 52 deletions
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue