api.go: only pass through GET requests to /health
This commit is contained in:
parent
9cb2219636
commit
287f285d79
|
@ -302,7 +302,7 @@ func (api *API) authHandler(h http.Handler, lggr *logging.ZapEventLogger) http.H
|
||||||
wrap := func(w http.ResponseWriter, r *http.Request) {
|
wrap := func(w http.ResponseWriter, r *http.Request) {
|
||||||
// We let CORS preflight requests pass through the next
|
// We let CORS preflight requests pass through the next
|
||||||
// handler.
|
// handler.
|
||||||
if r.Method == http.MethodOptions || r.URL.Path == "/health" {
|
if r.Method == http.MethodOptions || (r.Method == http.MethodGet && r.URL.Path == "/health") {
|
||||||
h.ServeHTTP(w, r)
|
h.ServeHTTP(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user