-
Notifications
You must be signed in to change notification settings - Fork 52
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
Make Origin request header configurable #360
Comments
hmm, i see. i agree that we should add some way to configure it, what do you think is a good high-level way to expose it? in the meantime, you can work around by touching the rpc object directly, del boa.env.py_evm.vm.state._account_db._rpc._session.headers["Origin"] this should be safe to do -- the origin was just provided so that when connecting to |
Thanks for the suggestion. Works for me. I did have to adapt the command ( we are on del boa.env.evm.vm.state._account_db._rpc._rpc._session.headers["Origin"] As for the configuration, the cleanest way IMO is to use an env header what defaults to blank string and people could assign it to whatever they want. Alternatively, to make it more expressive (and preserve current default behavior) we could provide a headers_override kwarg to any command that takes rpc_url, example |
this sounds most flexible, let's do this |
titanoboa/boa/rpc.py
Line 102 in 99eb986
Currently, the value of the Origin request header for all RPC calls has been hardcoded to
Titanoboa
. This is causing issues using alchemy in certain cases. It seems to be affecting certain accounts.Example: With my personal Alchemy key, the following works
However, when @scherrey tries it with his key, the request containing
Origin: Titanoboa
fails.This issue does not happen when forking arbitrum. My thinking is that some accounts are sharded to different loadbalancer implementations which might be validating headers in a stricter manner, or might even be something in account settings.
I don't want to raise this with Alchemy yet because The current value of Origin header is
Titanaboa
which appears to be invalid value per RFC6454The text was updated successfully, but these errors were encountered: