mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
move healthcheck before the secret checking (#130)
since health checks on AWS target groups do not support sending headers, it's impossible to use the health check when a secret is configured.
This commit is contained in:
parent
47e35a224e
commit
24562a246f
@ -241,16 +241,16 @@ func (h *httpHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
panic(errInvalidMethod)
|
||||
}
|
||||
|
||||
if !checkSecret(r) {
|
||||
panic(errInvalidSecret)
|
||||
}
|
||||
|
||||
if r.URL.RequestURI() == healthPath {
|
||||
rw.WriteHeader(200)
|
||||
rw.Write(imgproxyIsRunningMsg)
|
||||
return
|
||||
}
|
||||
|
||||
if !checkSecret(r) {
|
||||
panic(errInvalidSecret)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
if newRelicEnabled {
|
||||
|
Loading…
Reference in New Issue
Block a user