-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add user-agent to client requests #32
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
Conversation
c0b94f2 to
5ac9cb9
Compare
|
|
b1a5cb0 to
7dd9edd
Compare
|
Failed to load packit config file: For more info, please check out the documentation or contact the Packit team. You can also use our CLI command |
9afabc4 to
962450a
Compare
|
/gemini review |
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.
Code Review
This pull request adds a User-Agent header to outgoing client requests, which is a good feature for server-side logging and client identification. The version is injected at build time. My review has identified a few issues:
- There is a critical error in both the
Makefileand the RPM spec file in how the version is injected using linker flags. The path to the version variable is incorrect, which will cause the version to default to 'unknown'. - The implementation of the
http.RoundTripperfor adding the user agent can be made more robust to handle cases where a request might have anilheader. I've also suggested a small refactoring to improve code clarity and follow Go idioms.
Please address these points to ensure the feature works correctly and robustly.
Signed-off-by: Antonio Murdaca <[email protected]>
1adac1d to
88dea61
Compare
Signed-off-by: Antonio Murdaca <[email protected]>
go-fdo-server also needs this for to0 too