Skip to content
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

Add custom User-Agent to Hermes queries #4017

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

freak12techno
Copy link
Contributor

Closes: #3979

Description

Adding custom User-Agent for all queries done via HttpClient (except for tests) by building HttpClient and providing it with a User-Agent header.

Here's now what's happening in Nginx logs on my node when I do hermes health-check:

<IP> - - [03/Jun/2024:15:50:48 +0200] "POST / HTTP/1.1" 200 1144 "-" "hermes/1.8.3"
<IP> - - [03/Jun/2024:15:50:49 +0200] "POST / HTTP/1.1" 200 73 "-" "hermes/1.8.3"
<IP> - - [03/Jun/2024:15:50:49 +0200] "POST / HTTP/1.1" 200 1144 "-" "hermes/1.8.3"
<IP> - - [03/Jun/2024:15:50:49 +0200] "POST / HTTP/1.1" 200 1144 "-" "hermes/1.8.3"
<IP> - - [03/Jun/2024:15:50:49 +0200] "POST / HTTP/1.1" 200 324 "-" "hermes/1.8.3"
<IP> - - [03/Jun/2024:15:50:50 +0200] "POST / HTTP/1.1" 200 6961678 "-" "hermes/1.8.3"

PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@freak12techno
Copy link
Contributor Author

@romac can you look at that?

@romac romac changed the title feat: add custom User-Agent to Hermes queries Add custom User-Agent to Hermes queries Jun 4, 2024
crates/relayer-cli/src/commands/listen.rs Outdated Show resolved Hide resolved
crates/chain-registry/src/querier.rs Outdated Show resolved Hide resolved
@freak12techno freak12techno requested a review from romac June 4, 2024 10:44
Copy link
Member

@romac romac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@romac romac enabled auto-merge June 5, 2024 05:38
@romac romac merged commit 591a920 into informalsystems:master Jun 5, 2024
29 checks passed
@freak12techno freak12techno deleted the add-custom-user-agent branch June 26, 2024 13:28
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.

Add custom User-Agent header to all Hermes queries
2 participants