Commit bccf84c01f
Unsigned
Layout: unified · split
src/server.rs +9 −4
| @@ -347,11 +347,16 @@ impl MatrixServer { | ||
| 347 | 347 | .expect("Server got deleted while server config is alive"); |
| 348 | 348 | |
| 349 | 349 | let mut server = server_ref.borrow_mut(); |
| 350 | let proxy = Url::parse(option.value().as_ref()).expect( | |
| 351 | "Can't parse proxy URL, did the check callback fail?", | |
| 352 | ); | |
| 353 | 350 | |
| 354 | server.settings.proxy = Some(proxy) | |
| 351 | if option.value().is_empty() { | |
| 352 | server.settings.proxy = None | |
| 353 | } else { | |
| 354 | let proxy = Url::parse(option.value().as_ref()).expect( | |
| 355 | "Can't parse proxy URL, did the check callback fail?", | |
| 356 | ); | |
| 357 | ||
| 358 | server.settings.proxy = Some(proxy) | |
| 359 | } | |
| 355 | 360 | }); |
| 356 | 361 | |
| 357 | 362 | server_section |