summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-09 09:17:08 +0200
committerGitHub <noreply@github.com>2024-06-09 09:17:08 +0200
commitbd8016060c8f7055bf4342b52aff8abb5f8fc291 (patch)
treef21a9093e7edd8f5b6784c912d9cf4ff38aadcec /src/conf_mode
parenta79c094c3b0a543d4dc04adb3fc64e215b910593 (diff)
parent60d7c0ecaff49ec62f4600a460f5fbe7b26a0d9c (diff)
downloadvyos-1x-bd8016060c8f7055bf4342b52aff8abb5f8fc291.tar.gz
vyos-1x-bd8016060c8f7055bf4342b52aff8abb5f8fc291.zip
Merge pull request #3598 from Embezzle/T6454
reverse-proxy: T6454: Set default value of http for haproxy mode
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/load-balancing_reverse-proxy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/load-balancing_reverse-proxy.py b/src/conf_mode/load-balancing_reverse-proxy.py
index 09c68dadd..17226efe9 100755
--- a/src/conf_mode/load-balancing_reverse-proxy.py
+++ b/src/conf_mode/load-balancing_reverse-proxy.py
@@ -85,7 +85,7 @@ def verify(lb):
raise ConfigError(f'"expect status" and "expect string" can not be configured together!')
if 'health_check' in back_config:
- if 'mode' not in back_config or back_config['mode'] != 'tcp':
+ if back_config['mode'] != 'tcp':
raise ConfigError(f'backend "{back}" can only be configured with {back_config["health_check"]} ' +
f'health-check whilst in TCP mode!')
if 'http_check' in back_config:
@@ -108,7 +108,7 @@ def verify(lb):
# Check if http-response-headers are configured in any frontend/backend where mode != http
for group in ['service', 'backend']:
for config_name, config in lb[group].items():
- if 'http_response_headers' in config and ('mode' not in config or config['mode'] != 'http'):
+ 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!')
for front, front_config in lb['service'].items():