Skip to content
Discussion options

You must be logged in to vote

You are right. Checking content-length alone is not enough and can be bypassed via request streaming.

Safest approach is always putting your service behind a reverse proxy (like nginx) or CDN that makes sure request size limit is applied from outer layer.

We could also do it in runtime by measuring read body. There is an open issue you can track when it becomes available (#859)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@outslept
Comment options

Answer selected by outslept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants