Skip to content
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

Max request size per endpoint? #1138

Closed
twoxfh opened this issue Jan 3, 2021 · 1 comment
Closed

Max request size per endpoint? #1138

twoxfh opened this issue Jan 3, 2021 · 1 comment
Labels

Comments

@twoxfh
Copy link

twoxfh commented Jan 3, 2021

There is a max request size parameter on Javalin start, however, is there a way you can implement it for specific endpoints? Ideally the endpoint would error out as soon as the bytes exceed the specified amount. Any references would be appreciated.

@twoxfh twoxfh changed the title Max body content size per endpoint? Max request size per endpoint? Jan 3, 2021
@tipsy tipsy added the QUESTION label Jan 9, 2021
@tipsy
Copy link
Member

tipsy commented Jan 9, 2021

@twoxfh there is nothing built in for this, but it should be as easy as doing throwing a 413 if you see that the body is too large?

throw HttpResponseException(413, "Payload too large")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants