From 3076697a346e2f0889b6c446359a46773c1970bb Mon Sep 17 00:00:00 2001 From: Hitesh Walia <46204783+l0n3star@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:07:52 +0530 Subject: [PATCH] AV-79411 custom user agent in HTTP header (#200) --- Makefile | 4 ++-- internal/api/client.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 03296c8e..36133b8b 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ GOFLAGS=-mod=vendor GOOPTS="-p 2" GOFMT_FILES?=$$(find . -name '*.go') -GITTAG=$(shell git describe --always --tags) +GITTAG=$(shell git describe --tags --abbrev=0) VERSION=$(GITTAG:v%=%) -LINKER_FLAGS=-s -w -X 'github.com/couchbasecloud/terraform-provider-couchbase-cloud/version.ProviderVersion=${VERSION}' +LINKER_FLAGS=-s -w -X 'github.com/couchbasecloud/terraform-provider-couchbase-capella/version.ProviderVersion=${VERSION}' GOLANGCI_VERSION=v1.55.2 diff --git a/internal/api/client.go b/internal/api/client.go index 19ed95ab..01d918c9 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -134,6 +134,7 @@ func (c *Client) ExecuteWithRetry( } req.Header.Set("Authorization", "Bearer "+authToken) + req.Header.Set("User-Agent", userAgent) for header, value := range headers { req.Header.Set(header, value) }