reimplement Data

This commit is contained in:
mpostma 2020-12-22 17:53:13 +01:00
parent 55e1552957
commit 0d7c4beecd
5 changed files with 44 additions and 23 deletions

View file

@ -35,7 +35,7 @@ pub fn create_app(
.data(data.clone())
.app_data(
web::JsonConfig::default()
.limit(data.http_payload_size_limit)
.limit(data.http_payload_size_limit())
.content_type(|_mime| true) // Accept all mime types
.error_handler(|err, _req| payload_error_handler(err).into()),
)