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:
parent
551fc372a1
commit
1bdb3358b4
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue