From 6d294b6bb4653e37996e3f21a4449f6a55d1d107 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 18 Mar 2018 22:07:52 -0700 Subject: [PATCH] agent/structs: json omit QueryMeta --- agent/connect_ca_endpoint.go | 2 +- agent/structs/connect_ca.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/connect_ca_endpoint.go b/agent/connect_ca_endpoint.go index 8e92417bc4..1c78710150 100644 --- a/agent/connect_ca_endpoint.go +++ b/agent/connect_ca_endpoint.go @@ -24,5 +24,5 @@ func (s *HTTPServer) ConnectCARoots(resp http.ResponseWriter, req *http.Request) return nil, err } - return reply.Roots, nil + return reply, nil } diff --git a/agent/structs/connect_ca.go b/agent/structs/connect_ca.go index 87211e09ff..46725dcc7e 100644 --- a/agent/structs/connect_ca.go +++ b/agent/structs/connect_ca.go @@ -10,7 +10,9 @@ type IndexedCARoots struct { // Roots is a list of root CA certs to trust. Roots []*CARoot - QueryMeta + // QueryMeta contains the meta sent via a header. We ignore for JSON + // so this whole structure can be returned. + QueryMeta `json:"-"` } // CARoot represents a root CA certificate that is trusted.