Skip to content

Commit a9838ac

Browse files
committed
Warn on startup if no mirrors are allowed
1 parent e1ca53b commit a9838ac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

apt-cacher-rs.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
#aliases = []
5050

5151
# List of allowed mirrors.
52+
# Note that by default no mirrors are allowed.
5253
# Example:
53-
# allowed_mirrors = [ 'deb.debian.org' ]
54+
# allowed_mirrors = [ 'deb.debian.org', '*.ubuntu.com' ]
5455
#allowed_mirrors = []
5556

5657
# List of allowed clients.

src/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -3053,6 +3053,10 @@ fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
30533053
}
30543054
}
30553055

3056+
if global_config().allowed_mirrors.is_empty() {
3057+
warn!("No mirror allowed, consider setting option 'allowed_mirrors'");
3058+
}
3059+
30563060
info!(
30573061
"Using cache directory `{}`",
30583062
global_config().cache_directory.display()

0 commit comments

Comments
 (0)