diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-04-26 21:40:28 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-04-26 21:40:28 +0300 |
commit | cce3706f57ec6424ea7c62ebffd19a3ccbe49c0e (patch) | |
tree | faf1e56e5c1475c0a2ed6845b551905fb780556a /internal | |
parent | 60ef8fa86cfe3d67c2741f22ffaceb6d9a32731f (diff) |
Compare status path against request path
Diffstat (limited to 'internal')
-rw-r--r-- | internal/healthcheck/middleware.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/healthcheck/middleware.go b/internal/healthcheck/middleware.go index cd607f5a..2ddd35b7 100644 --- a/internal/healthcheck/middleware.go +++ b/internal/healthcheck/middleware.go @@ -7,7 +7,7 @@ import ( // NewMiddleware is serving the application status check func NewMiddleware(handler http.Handler, statusPath string) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.RequestURI == statusPath { + if r.URL.Path == statusPath { w.Header().Set("Cache-Control", "no-store") w.Write([]byte("success\n")) |