From c8b5aa2e90069b6f534ef9e754b68443fb9f8f10 Mon Sep 17 00:00:00 2001 From: michieldewilde Date: Fri, 3 May 2024 15:37:39 +0200 Subject: [PATCH] Add spacelift client type request header --- client/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 8b56af8..f40ac29 100644 --- a/client/client.go +++ b/client/client.go @@ -72,7 +72,11 @@ func (c *client) apiClient(ctx context.Context) (*graphql.Client, error) { return nil, fmt.Errorf("graphql client creation failed at http client creation: %w", err) } - return graphql.NewClient(c.session.Endpoint(), httpC), nil + requestOptions := []graphql.RequestOption{ + graphql.WithHeader("Spacelift-Client-Type", "spacectl"), + } + + return graphql.NewClient(c.session.Endpoint(), httpC, requestOptions...), nil } func (c *client) Do(req *http.Request) (*http.Response, error) {