Skip to content

Commit

Permalink
Add HTTP HEAD handling to /ping endpoint
Browse files Browse the repository at this point in the history
Also updates documentation to reflect new method.
  • Loading branch information
martinbaillie authored and ldez committed Jun 20, 2017
1 parent f79317a commit e0e4775
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/toml.md
Expand Up @@ -649,7 +649,7 @@ address = ":8080"
![Web UI Providers](img/web.frontend.png)
![Web UI Health](img/traefik-health.png)

- `/ping`: `GET` simple endpoint to check for Træfik process liveness.
- `/ping`: A simple endpoint to check for Træfik process liveness. Supports HTTP `GET` and `HEAD` requests.

```shell
$ curl -sv "http://localhost:8080/ping"
Expand Down
2 changes: 1 addition & 1 deletion server/web.go
Expand Up @@ -83,7 +83,7 @@ func (provider *WebProvider) Provide(configurationChan chan<- types.ConfigMessag
systemRouter.Methods("GET").Path(provider.Path + "health").HandlerFunc(provider.getHealthHandler)

// ping route
systemRouter.Methods("GET").Path(provider.Path + "ping").HandlerFunc(provider.getPingHandler)
systemRouter.Methods("GET", "HEAD").Path(provider.Path + "ping").HandlerFunc(provider.getPingHandler)
// API routes
systemRouter.Methods("GET").Path(provider.Path + "api").HandlerFunc(provider.getConfigHandler)
systemRouter.Methods("GET").Path(provider.Path + "api/version").HandlerFunc(provider.getVersionHandler)
Expand Down

0 comments on commit e0e4775

Please sign in to comment.