-
Notifications
You must be signed in to change notification settings - Fork 151
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
Conversation
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
b, err := io.ReadAll(resp.Body) | ||
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", scannerJwt)) | ||
|
||
resp, err := httpclient.Default.Get(dispatcherUrl) |
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.
no one uses the request....
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.
it should be http.DefaultClient.Do(req)
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 note the difference between httpclient.Default
and http.DefaultClient
- the former is from our core repo and has some defaults.)
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.
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