From d54db254216c639dfb40652eda3df5110c831ffd Mon Sep 17 00:00:00 2001 From: freddygv Date: Thu, 6 Oct 2022 11:14:55 -0600 Subject: [PATCH] Use existing query options to build ctx --- agent/cache-types/trust_bundle.go | 3 +-- agent/cache-types/trust_bundles.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/agent/cache-types/trust_bundle.go b/agent/cache-types/trust_bundle.go index b9db20645c..addc65ac94 100644 --- a/agent/cache-types/trust_bundle.go +++ b/agent/cache-types/trust_bundle.go @@ -83,8 +83,7 @@ func (t *TrustBundle) Fetch(_ cache.FetchOptions, req cache.Request) (cache.Fetc reqReal.QueryOptions.SetAllowStale(true) // Fetch - options := structs.QueryOptions{Token: reqReal.Token} - ctx, err := external.ContextWithQueryOptions(context.Background(), options) + ctx, err := external.ContextWithQueryOptions(context.Background(), reqReal.QueryOptions) if err != nil { return result, err } diff --git a/agent/cache-types/trust_bundles.go b/agent/cache-types/trust_bundles.go index d3c1f404c6..47f411f02f 100644 --- a/agent/cache-types/trust_bundles.go +++ b/agent/cache-types/trust_bundles.go @@ -87,8 +87,7 @@ func (t *TrustBundles) Fetch(_ cache.FetchOptions, req cache.Request) (cache.Fet reqReal.QueryOptions.SetAllowStale(true) // Fetch - options := structs.QueryOptions{Token: reqReal.Token} - ctx, err := external.ContextWithQueryOptions(context.Background(), options) + ctx, err := external.ContextWithQueryOptions(context.Background(), reqReal.QueryOptions) if err != nil { return result, err }