cryptgeon/backend/src/size.rs

12 lines
314 B
Rust
Raw Normal View History

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