diff options
author | Robert <rgingras@mieweb.com> | 2025-02-10 10:51:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-10 10:51:12 -0500 |
commit | f400eec4f40a814baba82f8a6d5755bdfd69f120 (patch) | |
tree | 729d57c54de53bc7d2f97d436496dd636d5b4045 /src/conf_mode/load-balancing_haproxy.py | |
parent | a24d2f87fdde466625d9b6173657f07cf4401f30 (diff) | |
parent | 41e9b8b362faedc0c20316255d59d7f90e848a4c (diff) | |
download | vyos-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.py | 7 |
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'] |