diff --git a/.changelog/10189.txt b/.changelog/10189.txt new file mode 100644 index 000000000..7cd8cf570 --- /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 d8d5c65f2..d47252626 100644 --- a/agent/health_endpoint.go +++ b/agent/health_endpoint.go @@ -227,8 +227,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