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

JSON-RPC Cache improvements (authorization in dispatcher, poll error metric fix) #858

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

dkeysil
Copy link
Contributor

@dkeysil dkeysil commented Apr 3, 2024

  • I'm adding support of JWT authorization on dispatcher in blocksdata client
  • Poll error metric should be created as system metric

@dkeysil dkeysil requested a review from aomerk April 4, 2024 10:46
@dkeysil dkeysil merged commit a329087 into master Apr 4, 2024
1 check passed
@dkeysil dkeysil deleted the jsonrpc-cache-improvements branch April 4, 2024 11:04
b, err := io.ReadAll(resp.Body)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", scannerJwt))

resp, err := httpclient.Default.Get(dispatcherUrl)
Copy link
Contributor

Choose a reason for hiding this comment

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

no one uses the request....

Copy link
Contributor

Choose a reason for hiding this comment

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

it should be http.DefaultClient.Do(req)

Copy link
Contributor

Choose a reason for hiding this comment

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

(Please note the difference between httpclient.Default and http.DefaultClient - the former is from our core repo and has some defaults.)

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, the constructed request is not used and therefore the requests don't have the auth bearer header - client is making a generic GET call to dispatcher

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.

3 participants