summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2026-05-26 19:50:02 -0500
committerIndrajit Raychaudhuri <irc@indrajit.com>2026-06-19 03:08:06 -0500
commited8f6f0b3527dfb68713fd88cf660e323868d8a0 (patch)
tree929bae5765544178f91e6c622be7995ca520f3a0 /src
parent8a334590daa3104be0519bab8d73557304d8572c (diff)
downloadvyos-1x-ed8f6f0b3527dfb68713fd88cf660e323868d8a0.tar.gz
vyos-1x-ed8f6f0b3527dfb68713fd88cf660e323868d8a0.zip
haproxy: T8931: Add option http-server-close in backend sections
Diffstat (limited to 'src')
-rw-r--r--src/conf_mode/load-balancing_haproxy.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/load-balancing_haproxy.py b/src/conf_mode/load-balancing_haproxy.py
index 0f31880ba..f95d05151 100644
--- a/src/conf_mode/load-balancing_haproxy.py
+++ b/src/conf_mode/load-balancing_haproxy.py
@@ -149,7 +149,12 @@ def verify(lb):
for group in ['service', 'backend']:
for config_name, config in lb[group].items():
if 'http_response_headers' in config and config['mode'] != 'http':
- raise ConfigError(f'{group} {config_name} must be set to http mode to use http_response_headers!')
+ raise ConfigError(f'{group} {config_name} must be set to http mode to use http-response headers!')
+
+ # Check if http-server-close is configured in any backend where mode != http
+ for config_name, config in lb['backend'].items():
+ if 'http_server_close' in config and config['mode'] != 'http':
+ raise ConfigError(f'backend {config_name} must be set to http mode to use http-server-close!')
def generate(lb):