Skip to content

Commit e6902c2

Browse files
committed
修复命令行未序列化参数被api配置覆盖掉的bug
1 parent c10894f commit e6902c2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
<!-- next-header -->
44

5+
## [2025.2.20] - 2025.2.20
6+
7+
### Fixes
8+
9+
- 修复命令行未序列化参数被api配置覆盖掉的bug
10+
511
## [2025.2.10] - 2025.2.10
612

713
### Fixes

observer_ward/src/api.rs

+7
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,18 @@ async fn what_web_api(
3333
token: web::Data<TokenAuth>,
3434
auth: BearerAuth,
3535
config: web::Json<ObserverWardConfig>,
36+
cli_config: web::Data<ObserverWardConfig>,
3637
cl: web::Data<RwLock<ClusterType>>,
3738
) -> impl Responder {
3839
if !validator(token, auth) {
3940
return HttpResponse::Unauthorized().finish();
4041
}
42+
let mut config = config.clone();
43+
config.plugin = cli_config.plugin.clone();
44+
config.config_dir = cli_config.config_dir.clone();
45+
config.mode = cli_config.mode.clone();
46+
config.proxy = cli_config.proxy.clone();
47+
config.nuclei_args = cli_config.nuclei_args.clone();
4148
let webhook = config.webhook.is_some();
4249
if let Ok(cl) = cl.read() {
4350
let output = Output::new(&config);

0 commit comments

Comments
 (0)