Implement dual host configuration: bind_host and hostname
- Replace 'host' config with separate 'bind_host' and 'hostname' - bind_host: IP/interface for server binding (default 0.0.0.0) - hostname: Domain for URI validation (required) - Update all parsing and validation code - Create dist/ directory with systemd service, config, and install guide - Add comprehensive INSTALL.md with setup instructions
This commit is contained in:
parent
1665df65da
commit
ea8083fe1f
7 changed files with 333 additions and 13 deletions
|
|
@ -40,7 +40,7 @@ pub async fn serve_file(
|
|||
pub async fn handle_connection(
|
||||
mut stream: TlsStream<TcpStream>,
|
||||
dir: &str,
|
||||
expected_host: &str,
|
||||
hostname: &str,
|
||||
expected_port: u16,
|
||||
max_concurrent_requests: usize,
|
||||
_test_processing_delay: u64,
|
||||
|
|
@ -97,7 +97,7 @@ pub async fn handle_connection(
|
|||
}
|
||||
|
||||
// Parse Gemini URL
|
||||
let path = match parse_gemini_url(&request, expected_host, expected_port) {
|
||||
let path = match parse_gemini_url(&request, hostname, expected_port) {
|
||||
Ok(p) => p,
|
||||
Err(_) => {
|
||||
logger.log_error(59, "Invalid URL format");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue