-
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
Add support to disallow rpc api endpoints #9055
Comments
Hi, I would like to give this one a try |
related #8731 |
@mattsse I have 2 questions:
or is this one better:
|
yeah method not found or method not whitelisted |
I'd also like to support some presets, like |
@mattsse Could you elaborate on that? Maybe provide an example |
just to simplify tracking, going to dupe it in favor of #8731 which is the same request |
Component
Anvil
Describe the feature you would like
anvil's api is quite massive and some endpoints are considered "god mode"
there are usecases where these should be restricted.
this should be done on the rpc server level because this is how the server is exposed and the easiest solution here is:
foundry/crates/anvil/server/src/config.rs
Line 8 in e215f3f
foundry/crates/anvil/server/src/lib.rs
Lines 76 to 78 in e215f3f
this layer should deserialize the request and reject disallowed methods, this is likely slightly inefficient but this deserialization overhead should be fine because we only need to check for method.
Additional context
No response
The text was updated successfully, but these errors were encountered: