diff --git a/README.md b/README.md index 4508fe7..c6f45df 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,11 @@ Specify a custom address for the server by passing the `-a` or `--address` argum libreddit --address=0.0.0.0:8111 ``` +To disable the media proxy built into Libreddit, run: +``` +libreddit --no-default-features +``` + ## Building from Source ``` diff --git a/src/main.rs b/src/main.rs index 3221a1d..043e758 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,9 +32,11 @@ async fn main() -> std::io::Result<()> { let mut address = "0.0.0.0:8080".to_string(); if args.len() > 1 { - if args[1].starts_with("--address=") || args[1].starts_with("-a=") { - let split: Vec<&str> = args[1].split("=").collect(); - address = split[1].to_string(); + for arg in args { + if arg.starts_with("--address=") || arg.starts_with("-a=") { + let split: Vec<&str> = arg.split("=").collect(); + address = split[1].to_string(); + } } }