2022-07-16 12:16:54 +00:00
|
|
|
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) {
|
2022-07-16 12:16:54 +00:00
|
|
|
let json = web::JsonConfig::default().limit(*config::LIMIT);
|
2022-03-12 13:07:33 +00:00
|
|
|
let plain = web::PayloadConfig::default()
|
2022-07-16 12:16:54 +00:00
|
|
|
.limit(*config::LIMIT)
|
2022-03-12 13:07:33 +00:00
|
|
|
.mimetype(mime::STAR_STAR);
|
2022-10-07 19:28:25 +00:00
|
|
|
// 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
|
|
|
}
|