When oauth2-proxy is built without the Makefile/dist.sh ldflags (for example
via `go install github.com/oauth2-proxy/oauth2-proxy/v7@latest`), the VERSION
variable kept its default "undefined" value, so `oauth2-proxy --version`
reported "oauth2-proxy undefined (built with ...)".
Fall back to the module version recorded in runtime/debug build info when
VERSION has not been overridden at build time. The ldflags-injected value
still takes precedence, so official release builds are unchanged.
Closes#3451
Signed-off-by: Lrifton92 <Lrifton92@users.noreply.github.com>
* 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