Add http_port range validation (0 or 1-65535)
Change http_port type from u16 to u32 to allow out-of-range values to be caught by validation. Add HttpPortInvalid error variant and validation check for http_port > 65535. Add test for http_port=65536 producing HttpPortInvalid. http_port=0 (disabled) remains valid per existing test.
This commit is contained in:
@@ -259,7 +259,7 @@ async fn test_rate_limit_eviction_task() {
|
||||
|
||||
fn make_redirect_listener_config(
|
||||
bind_addr: &str,
|
||||
http_port: u16,
|
||||
http_port: u32,
|
||||
https_port: u16,
|
||||
) -> reverse_proxy::config::static_config::ListenerConfig {
|
||||
reverse_proxy::config::static_config::ListenerConfig {
|
||||
|
||||
Reference in New Issue
Block a user