From 85be7579f4e93f9da06b5e8775b5296be953d422 Mon Sep 17 00:00:00 2001 From: Alex W Date: Mon, 27 Jan 2025 20:57:27 +0000 Subject: haproxy: T7081: Support HTTP compression (#4314) --- src/conf_mode/load-balancing_haproxy.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/conf_mode/load-balancing_haproxy.py b/src/conf_mode/load-balancing_haproxy.py index 45042dd52..5fd1beec9 100644 --- a/src/conf_mode/load-balancing_haproxy.py +++ b/src/conf_mode/load-balancing_haproxy.py @@ -78,6 +78,13 @@ def verify(lb): not is_listen_port_bind_service(int(tmp_port), 'haproxy'): raise ConfigError(f'"TCP" port "{tmp_port}" is used by another service') + if 'http_compression' in front_config: + if front_config['mode'] != 'http': + raise ConfigError(f'service {front} must be set to http mode to use http-compression!') + if len(front_config['http_compression']['mime_type']) == 0: + raise ConfigError(f'service {front} must have at least one mime-type configured to use' + f'http_compression!') + for back, back_config in lb['backend'].items(): if 'http_check' in back_config: http_check = back_config['http_check'] -- cgit v1.2.3