-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: inject deck version into User-Agent header #652
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge after resolving the comment.
cmd/root.go
Outdated
|
||
func extendHeaders(headers []string) []string { | ||
userAgentHeader := fmt.Sprintf( | ||
"User-Agent:decK/%s (%s) %s", VERSION, COMMIT, runtime.Version(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we skip COMMIT for now?
"User-Agent:decK/%s (%s) %s", VERSION, COMMIT, runtime.Version(), | |
"User-Agent:decK/%s", VERSION, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
@@ Coverage Diff @@
## main #652 +/- ##
==========================================
- Coverage 44.39% 44.37% -0.03%
==========================================
Files 74 74
Lines 8774 8778 +4
==========================================
Hits 3895 3895
- Misses 4518 4522 +4
Partials 361 361
Continue to review full report at Codecov.
|
Before this change: ``` $ deck ping <-- kong logs --> 172.19.0.1 - "GET / HTTP/1.1" 200 17479 "-" "Go-http-client/1.1" ``` After this change: ``` $ deck ping <-- kong logs --> 172.19.0.1 - "GET / HTTP/1.1" 200 17479 "-" "decK/v1.11.0" ```
Before this change:
After this change: