1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-08 22:46:33 +02:00

feat: Replace default Go user-agent with oauth2-proxy and version (#2570)

* feat: Replace default Go user-agent with oauth2-proxy and version

* Add to CHANGELOG

* Make userAgentTransport configurable and composable

* Use correct naming convention for DefaultHTTPClient

* Move version to own package and use named arguments

* Update version path in Makefile

* Fix import path in Makefile

* Change importpath in dist.sh

* Minor style issues
This commit is contained in:
Jacob Middag
2024-07-14 22:09:17 +02:00
committed by GitHub
parent 45ec12bcae
commit 3045392c17
11 changed files with 54 additions and 9 deletions

View File

@ -8,6 +8,8 @@ import (
"fmt"
"net/http"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/version"
"github.com/bitly/go-simplejson"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@ -19,7 +21,7 @@ var _ = Describe("Builder suite", func() {
baseHeaders := http.Header{
"Accept-Encoding": []string{"gzip"},
"User-Agent": []string{"Go-http-client/1.1"},
"User-Agent": []string{"oauth2-proxy/" + version.VERSION},
}
BeforeEach(func() {