From 5ee7e282cf46771b4d2bad1ae09d9b82a38c624b Mon Sep 17 00:00:00 2001 From: Will Norris Date: Sat, 9 Sep 2017 08:31:22 +0000 Subject: [PATCH] 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? --- imageproxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageproxy.go b/imageproxy.go index b06329b..22ecde4 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -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 }