summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorAlex W <embezzle.dev@proton.me>2025-01-27 20:57:27 +0000
committerGitHub <noreply@github.com>2025-01-27 22:57:27 +0200
commit85be7579f4e93f9da06b5e8775b5296be953d422 (patch)
tree795902fa16a0b7fb284834d88f4c302a4448ac19 /src/conf_mode
parentd50cdfee916c6d0b5c60c03d589f9292954b6688 (diff)
downloadvyos-1x-85be7579f4e93f9da06b5e8775b5296be953d422.tar.gz
vyos-1x-85be7579f4e93f9da06b5e8775b5296be953d422.zip
haproxy: T7081: Support HTTP compression (#4314)
Diffstat (limited to 'src/conf_mode')
-rw-r--r--src/conf_mode/load-balancing_haproxy.py7
1 files changed, 7 insertions, 0 deletions
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']