Add HTTP HEAD handling to /ping endpoint
Also updates documentation to reflect new method.
This commit is contained in:
parent
f79317a435
commit
447109e868
2 changed files with 2 additions and 2 deletions
|
@ -649,7 +649,7 @@ address = ":8080"
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
- `/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
|
```shell
|
||||||
$ curl -sv "http://localhost:8080/ping"
|
$ curl -sv "http://localhost:8080/ping"
|
||||||
|
|
|
@ -83,7 +83,7 @@ func (provider *WebProvider) Provide(configurationChan chan<- types.ConfigMessag
|
||||||
systemRouter.Methods("GET").Path(provider.Path + "health").HandlerFunc(provider.getHealthHandler)
|
systemRouter.Methods("GET").Path(provider.Path + "health").HandlerFunc(provider.getHealthHandler)
|
||||||
|
|
||||||
// ping route
|
// 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
|
// API routes
|
||||||
systemRouter.Methods("GET").Path(provider.Path + "api").HandlerFunc(provider.getConfigHandler)
|
systemRouter.Methods("GET").Path(provider.Path + "api").HandlerFunc(provider.getConfigHandler)
|
||||||
systemRouter.Methods("GET").Path(provider.Path + "api/version").HandlerFunc(provider.getVersionHandler)
|
systemRouter.Methods("GET").Path(provider.Path + "api/version").HandlerFunc(provider.getVersionHandler)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue