Removed file size limit

This commit is contained in:
StNicolay 2024-08-11 08:20:25 +03:00
parent 1c9bd104e0
commit ec7fbc07a0
Signed by: StNicolay
GPG Key ID: 9693D04DCD962B0D
2 changed files with 32 additions and 27 deletions

52
Cargo.lock generated
View File

@ -107,7 +107,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -220,7 +220,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -321,9 +321,9 @@ checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
[[package]]
name = "cc"
version = "1.1.8"
version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549"
checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292"
dependencies = [
"jobserver",
"libc",
@ -377,9 +377,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "core-foundation-sys"
version = "0.8.6"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
@ -460,7 +460,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -471,7 +471,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -677,7 +677,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -1376,7 +1376,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -1731,22 +1731,22 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.205"
version = "1.0.206"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150"
checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.205"
version = "1.0.206"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1"
checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -1969,7 +1969,7 @@ dependencies = [
"quote",
"sqlx-core",
"sqlx-macros-core",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -1992,7 +1992,7 @@ dependencies = [
"sqlx-mysql",
"sqlx-postgres",
"sqlx-sqlite",
"syn 2.0.72",
"syn 2.0.73",
"tempfile",
"tokio",
"url",
@ -2142,9 +2142,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.72"
version = "2.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
checksum = "837a7e8026c6ce912ff01cefbe8cafc2f8010ac49682e2a3d9decc3bce1ecaaf"
dependencies = [
"proc-macro2",
"quote",
@ -2193,7 +2193,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -2278,7 +2278,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -2375,7 +2375,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -2511,7 +2511,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]
@ -2565,7 +2565,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
"wasm-bindgen-shared",
]
@ -2587,7 +2587,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -2811,7 +2811,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.72",
"syn 2.0.73",
]
[[package]]

View File

@ -8,7 +8,11 @@ mod prelude;
use std::{env, net::Ipv4Addr};
use auth::HashedBytes;
use axum::{extract::FromRef, routing::post, Router};
use axum::{
extract::{DefaultBodyLimit, FromRef},
routing::post,
Router,
};
use file_storage::FileStorage;
use tokio::{net::TcpListener, signal};
@ -107,6 +111,7 @@ fn app(state: AppState) -> Router {
use tower_http::ServiceBuilderExt as _;
let middleware = tower::ServiceBuilder::new()
.layer(DefaultBodyLimit::disable())
.sensitive_headers([header::AUTHORIZATION, header::COOKIE])
.trace_for_http()
.compression();