summaryrefslogtreecommitdiff
path: root/src/conf_mode/load-balancing_haproxy.py
diff options
context:
space:
mode:
authorRobert <rgingras@mieweb.com>2025-02-10 10:51:12 -0500
committerGitHub <noreply@github.com>2025-02-10 10:51:12 -0500
commitf400eec4f40a814baba82f8a6d5755bdfd69f120 (patch)
tree729d57c54de53bc7d2f97d436496dd636d5b4045 /src/conf_mode/load-balancing_haproxy.py
parenta24d2f87fdde466625d9b6173657f07cf4401f30 (diff)
parent41e9b8b362faedc0c20316255d59d7f90e848a4c (diff)
downloadvyos-1x-f400eec4f40a814baba82f8a6d5755bdfd69f120.tar.gz
vyos-1x-f400eec4f40a814baba82f8a6d5755bdfd69f120.zip
Merge branch 'current' into T7095_vrf-fix
Diffstat (limited to 'src/conf_mode/load-balancing_haproxy.py')
-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']