Skip to content

feature: Block batched requests #466

@JooKop

Description

@JooKop

It would be great if eRPC had the option to completely block batched requests. Even if you use rate limiting on e.g. AWS WAF rules, a single user could sneak in a huge batch of 100+ requests in a single request, technically bypassing the ratelimit and making eRPC slow for others to use.

Enabling rate limiting on eRPC's side is also not enough, because if one is using e.g. a reverse proxy, all clients' requests will seemingly come from the same IP unless support for x-forwarded-ip is added.

Describe the solution you'd like
Just a top level config on erpc for something like allowBatchRequests that defaults to true. If set to false, any JSON-RPC requests with a JSON-array that has more than a single top-level item should be not allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions