Skip to content

feat: set User-Agent HTTP header on all outgoing requests#316

Draft
silvestre wants to merge 1 commit into
mainfrom
set-user-agent
Draft

feat: set User-Agent HTTP header on all outgoing requests#316
silvestre wants to merge 1 commit into
mainfrom
set-user-agent

Conversation

@silvestre
Copy link
Copy Markdown
Member

Issue

It is currently not possible to distinguish requests coming from this CLI plugin from other clients.

Fix

Add a util/useragent package that builds a User-Agent string from version, VCS URL, and platform info. Thread it explicitly through the command layer into both APIHelper (sets the header on every request) and NewCFAPIClient (passes it via the go-cfclient config option).

AI

This PR was created using Claude Code.

# Issue

It is currently not possible to distinguish requests coming from this CLI plugin from other clients.

# Fix

Add a `util/useragent` package that builds a User-Agent string from version, VCS URL, and platform info. Thread it explicitly through the command layer into both `APIHelper` (sets the header on every request) and `NewCFAPIClient` (passes it via the go-cfclient config option).

# AI

This PR was created using Claude Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant