fox: external-controller cors error

This commit is contained in:
huzibaca 2024-10-11 22:01:57 +08:00
parent 5e7ff36e8e
commit e78f619be1
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -50,9 +50,13 @@ impl IClashTemp {
map.insert("allow-lan".into(), false.into()); map.insert("allow-lan".into(), false.into());
map.insert("mode".into(), "rule".into()); map.insert("mode".into(), "rule".into());
map.insert("external-controller".into(), "127.0.0.1:9097".into()); map.insert("external-controller".into(), "127.0.0.1:9097".into());
let mut cors_map = Mapping::new();
cors_map.insert("allow-private-network".into(), true.into());
cors_map.insert("allow-private-network".into(), true.into());
cors_map.insert("allow-origins".into(), vec!["*"].into());
map.insert("secret".into(), "".into()); map.insert("secret".into(), "".into());
map.insert("tun".into(), tun.into()); map.insert("tun".into(), tun.into());
map.insert("external-controller-cors".into(), cors_map.into());
Self(map) Self(map)
} }