-
Notifications
You must be signed in to change notification settings - Fork 70
Add GETH_HEADERS to be set as a config environment variable #44
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
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.
Looks great! Left a suggestion to rename a field.
Would appreciate a test in configuration_test.go to make sure env vars are correctly parsed and in client_test.go to ensure that headers are set appropriately :) 🙏
|
I've added some checks to the |
|
@akramhussein configuration tests look good! can we add a test for the client as well i.e. when the configuration contains geth headers, they get set in the geth calls? 🙏 Also, sometimes the builds get stuck like they have on your last commit. Pushing a new commit or an empty commit usually resolves the issue. :) |
|
Sure - where should this test go, in |
|
I might need some guidance here as In The other tests use a mock JSONRPC and client GraphQL to run checks on, however Further the interface for the |
|
Hi @septerr - do you have any thoughts on above? Also, I've tried to re-trigger a build with empty commits but doesn't seem to work :( |
|
Hi @akramhussein , Let's shelve the client test for now. I am checking with some folks about why the build is not working. Sorry for the delay in response. |
|
Hi @akramhussein, if it is not too much trouble, can you try creating a new PR with these changes to get past the build issue? 🙏 🙏 🙏 |
|
Ahhh! Thanks for the info! I'll keep trying to work with folks to figure out what's going on. |
…oinbase#44)" This reverts commit 68306c7.
Motivation
When connecting to remote/hosted nodes, they often require some form of authentication. This is either in the URL as a query or url parameter.
However, in the case of BlockDaemon, it’s an HTTP header
X-Auth-Token.Solution
I found the only way to address this was to add another environment variable
GETH_HEADERSthat allows you to pass in a comma separated list of key:values.Open questions
None