0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

Add health-check endpoint

This commit is contained in:
Phil Howell 2016-01-12 17:19:27 +00:00
parent 551fc372a1
commit 1bdb3358b4

View file

@ -97,6 +97,11 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return // ignore favicon requests
}
if r.URL.Path == "/health-check" {
fmt.Fprint(w, "OK")
return
}
req, err := NewRequest(r, p.DefaultBaseURL)
if err != nil {
msg := fmt.Sprintf("invalid request URL: %v", err)