Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Make max_body_size configurable via env, drop custom check, use 413 #39

Merged
merged 1 commit into from
May 3, 2024

Conversation

bretthoerner
Copy link
Contributor

I didn't know Axum had its own default limit until today, this cleans up the hack made here cf9b82d and leans into their limiter and makes it more easily configurable.

@bretthoerner bretthoerner force-pushed the brett/max_body_size branch from 1435e42 to 1ed0af5 Compare May 3, 2024 18:30
@@ -16,6 +16,9 @@ pub struct Config {

#[envconfig(default = "100")]
pub max_pg_connections: u32,

#[envconfig(default = "5000000")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, but this doesn't support anything but a plain number (i.e. no 5_000_000)

@bretthoerner bretthoerner requested a review from xvello May 3, 2024 18:33
@bretthoerner bretthoerner merged commit ee769d9 into main May 3, 2024
4 checks passed
@bretthoerner bretthoerner deleted the brett/max_body_size branch May 3, 2024 19:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants