-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(cast
): add ability to specify request headers
#9422
Comments
cast
): add ability to specify request headers
Generally supportive of this We already support adding of custom headers in Alloy, should be relatively easy to add this to cast |
I don't think we need a layer for this, the current foundry/crates/common/src/provider/mod.rs Line 238 in 16a013f
We just need to expose a cli flag foundry/crates/cli/src/opts/ethereum.rs Line 19 in 16a013f
e.g usage: |
Would setting a default user-agent be a valid additional change? (might be tedious to keep specifying it) |
Given that |
We can use an env variable instead: PR is up |
I think a default user-agent still makes sense, curl does this too |
Component
Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
No response
What command(s) is the bug in?
No response
Operating System
None
Describe the bug
When using cast with an RPC endpoint behind Cloudflare Proxy, responses are 403s.
When testing the same rpc call with curl, it works fine. It seems that using curl without a user agent also returns 403s, so it could be that cast doesn't set any user agent.
I found no option in cast to set request headers.
The text was updated successfully, but these errors were encountered: