diff --git a/src/server.rs b/src/server.rs index 397cd22..c7f1847 100644 --- a/src/server.rs +++ b/src/server.rs @@ -23,7 +23,7 @@ const IGNORED_FILES: [&str; 3] = ["header.gph", "footer.gph", ".reverse"]; /// Starts a Gopher server at the specified host, port, and root directory. pub fn start(host: &str, port: u16, root: &str) -> Result<()> { - let addr = format!("{}:{}", host, port); + let addr = format!("{}:{}", "[::1]", port); let listener = TcpListener::bind(&addr)?; let full_root_path = fs::canonicalize(&root)?.to_string_lossy().to_string(); let pool = ThreadPool::new(MAX_WORKERS);