refactor: move healthcheck middleware early in the pipeline
What does this MR do?
Abstract out an healthcheck middleware and move it early in the pipeline.
Add Cache: no-store
when returning healthcheck responses and don't add custom headers to it.
TestHealthCheckMiddleware
has also been expanded to cover more cases.
TODO
-
I added the Changelog
trailer (e.g.Changelog: feature
) to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines