Allow to customize max request body size
On of our customers asked for this as part of their migration to Hive Router. They are currently using it with
Things to cover in the plan:
* Security
* How should we implement this without creating a security issue? (for example: if the body is 100MB and the limit is 1MB, we should never read the whole 100MB)
* DDoS protection
* Fail fast (mentioned above)
* [https://en.wikipedia.org/wiki/Zip_bomb](<https://en.wikipedia.org/wiki/Zip_bomb>)
* Performance
* any impact?
* Interaction with other things
* Compression (do we check the body before or after compression? both?)
* multipart/sse/chunk?
* Is there a scenario where body size should be dynamic?
* if so, think about the cost
* Config structure
* Default value
* should we even limit?
* if so, to what?
* under `http`? `limits`? somewhere else?
* Error Handling
* What should be the response type, status code and body?
* How do we log this so the developer know about this?
* How other routers are doing that? what they use as default?
1 条评论