cryptgeon/packages/backend/src/size.rs

13 lines
342 B
Rust
Raw Normal View History

use crate::config;
2021-12-20 16:42:16 +00:00
use actix_web::web;
2021-12-22 12:10:08 +00:00
use mime;
2021-12-20 16:42:16 +00:00
pub fn init(cfg: &mut web::ServiceConfig) {
let json = web::JsonConfig::default().limit(*config::LIMIT);
2022-03-12 13:07:33 +00:00
let plain = web::PayloadConfig::default()
.limit(*config::LIMIT)
2022-03-12 13:07:33 +00:00
.mimetype(mime::STAR_STAR);
// cfg.app_data(plain);
2022-03-12 13:07:33 +00:00
cfg.app_data(json).app_data(plain);
2021-12-20 16:42:16 +00:00
}