2022-07-16 14:16:54 +02:00
|
|
|
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) {
|
2022-07-16 14:16:54 +02:00
|
|
|
let json = web::JsonConfig::default().limit(*config::LIMIT);
|
2022-03-12 14:07:33 +01:00
|
|
|
let plain = web::PayloadConfig::default()
|
2022-07-16 14:16:54 +02:00
|
|
|
.limit(*config::LIMIT)
|
2022-03-12 14:07:33 +01:00
|
|
|
.mimetype(mime::STAR_STAR);
|
2022-10-07 21:28:25 +02:00
|
|
|
// cfg.app_data(plain);
|
2022-03-12 14:07:33 +01:00
|
|
|
cfg.app_data(json).app_data(plain);
|
2021-12-20 17:42:16 +01:00
|
|
|
}
|