diff --git a/.changelog/10189.txt b/.changelog/10189.txt new file mode 100644 index 0000000000..7cd8cf5706 --- /dev/null +++ b/.changelog/10189.txt @@ -0,0 +1,4 @@ +```release-note:bug +http: fix a bug that caused the `X-Consul-Effective-Consistency` header to be missing on +request for service health +``` diff --git a/agent/health_endpoint.go b/agent/health_endpoint.go index cdfccd39f2..a0cfbfd100 100644 --- a/agent/health_endpoint.go +++ b/agent/health_endpoint.go @@ -234,8 +234,8 @@ func (s *HTTPHandlers) healthServiceNodes(resp http.ResponseWriter, req *http.Re if args.QueryOptions.UseCache { setCacheMeta(resp, &md) } + out.QueryMeta.ConsistencyLevel = args.QueryOptions.ConsistencyLevel() setMeta(resp, &out.QueryMeta) - out.ConsistencyLevel = args.QueryOptions.ConsistencyLevel() // FIXME: argument parsing should be done before performing the rpc // Filter to only passing if specified