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

return a 200 OK for requests to root /

This has come up a couple of times, such as in #95.  As discussed there,
I'm not completely sure this is actually necessary in many cases, but
it's certainly not harmful and if it makes health checks easier to setup
than why not?
This commit is contained in:
Will Norris 2017-09-09 08:31:22 +00:00
parent 955ea12402
commit 5ee7e282cf

View file

@ -99,7 +99,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return // ignore favicon requests
}
if r.URL.Path == "/health-check" {
if r.URL.Path == "/" || r.URL.Path == "/health-check" {
fmt.Fprint(w, "OK")
return
}