Making more config options optional
Dependencies
- [2]
D4SBRY6KInitial patch - [3]
X7GJK2QDUpdate - [4]
NV5CPVRHGetting rid of AWS SES to send emails - [5]
LE34RHBBFixing a CORS bug - [6]
YYJ76Q7VInitial attempt at CI/CD
Change contents
- edit in api/src/config_file.rs at line 29
#[serde(default)] - edit in api/src/config_file.rs at line 31
#[serde(default)] - edit in api/src/config_file.rs at line 34
#[serde(default)] - edit in api/src/config_file.rs at line 36
#[serde(default)] - edit in api/src/config_file.rs at line 38
#[serde(default)] - replacement in api/src/config_file.rs at line 41
pub geoip_database: String,#[serde(default)]pub geoip_database: Option<String>, - replacement in api/src/config.rs at line 37
pub maxmind: maxminddb::Reader<Vec<u8>>,pub maxmind: Option<maxminddb::Reader<Vec<u8>>>, - replacement in api/src/config.rs at line 247
maxminddb::Reader::open_readfile(&path).unwrap()Some(maxminddb::Reader::open_readfile(&path).unwrap())} else if let Some(ref db) = config_file.geoip_database {Some(maxminddb::Reader::open_readfile(db).unwrap()) - replacement in api/src/config.rs at line 251
maxminddb::Reader::open_readfile(&config_file.geoip_database).unwrap()None - replacement in api/src/config.rs at line 322
let ip = match ip {IpAddr::V6(addr) => {if let Some(ip) = addr.to_ipv4() {IpAddr::V4(ip)} else {IpAddr::V6(addr)if let Some(ref maxmind) = self.maxmind {let ip = match ip {IpAddr::V6(addr) => {if let Some(ip) = addr.to_ipv4() {IpAddr::V4(ip)} else {IpAddr::V6(addr)} - replacement in api/src/config.rs at line 331
}ip => ip,};self.maxmind.lookup(ip)ip => ip,};maxmind.lookup(ip)} else {Ok(None)}