Skip to content

Conversation

kpfleming
Copy link
Contributor

@kpfleming kpfleming commented Jun 26, 2025

The environment variable FASTLY_USER_AGENT_EXTENSION can be used to supply a string which will be inserted into the User-Agent header in requests sent to the Fastly API; the existing strings representing the Fastly CLI version and go-fastly version (when applicable) will still be present.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Test - before:

kpfleming@kpfleming:~/src/fastly/cli$ FASTLY_DEBUG_MODE=true ./fastly whoami


http.Request (dump): "GET /verify HTTP/1.1\r\nHost: api.fastly.com\r\nAccept: application/json\r\nFastly-Key: <redacted>\r\nUser-Agent: FastlyCLI/v0.0.0-unknown\r\n\r\n"

Test - after:

kpfleming@kpfleming:~/src/fastly/cli$ FASTLY_USER_AGENT_EXTENSION=test1234 FASTLY_DEBUG_MODE=true ./fastly whoami


http.Request (dump): "GET /verify HTTP/1.1\r\nHost: api.fastly.com\r\nAccept: application/json\r\nFastly-Key: <redacted>\r\nUser-Agent: FastlyCLI/v0.0.0-unknown, test1234\r\n\r\n"

The environment variable FASTLY_USER_AGENT_EXTENSION can be used to
supply a string which will be inserted into the User-Agent header in
requests sent to the Fastly API; the existing strings representing the
Fastly CLI version and go-fastly version (when applicable) will still
be present.
@kpfleming kpfleming marked this pull request as ready for review June 26, 2025 19:23
@kpfleming kpfleming requested a review from a team as a code owner June 26, 2025 19:23
@kpfleming kpfleming merged commit 37e2cf2 into fastly:main Jun 26, 2025
8 checks passed
@kpfleming kpfleming deleted the cdtool-1097 branch June 26, 2025 20:11
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.

2 participants