forked from AbleOS/holey-bytes
limitting request body size
This commit is contained in:
parent
f3879cb013
commit
f527d61c1e
|
@ -3,7 +3,7 @@ use {
|
||||||
argon2::{password_hash::SaltString, PasswordVerifier},
|
argon2::{password_hash::SaltString, PasswordVerifier},
|
||||||
axum::{
|
axum::{
|
||||||
body::Bytes,
|
body::Bytes,
|
||||||
extract::Path,
|
extract::{DefaultBodyLimit, Path},
|
||||||
http::{header::COOKIE, request::Parts},
|
http::{header::COOKIE, request::Parts},
|
||||||
response::{AppendHeaders, Html},
|
response::{AppendHeaders, Html},
|
||||||
},
|
},
|
||||||
|
@ -86,7 +86,8 @@ async fn amain() {
|
||||||
.as_millis();
|
.as_millis();
|
||||||
move || async move { id.to_string() }
|
move || async move { id.to_string() }
|
||||||
}),
|
}),
|
||||||
);
|
)
|
||||||
|
.layer(DefaultBodyLimit::max(16 * 1024));
|
||||||
|
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue