diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index b6415c5c3..0e2688315 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -450,7 +450,7 @@ {% do action_options.append('use_backend ' ~ acl_backend_data.name) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'use_server' %} {% if action_data.use_server|default("") != "" %} @@ -458,7 +458,7 @@ {% do action_options.append('use-server ' ~ server_data.name) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'map_use_backend' %} {# # First get the map file path #} @@ -484,21 +484,21 @@ {% do action_options.append('use_backend %[req.hdr(host),' ~ mapfile_config ~ '(' ~ mapfile_path ~ defaultbackend_option ~ ')]') %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'fcgi_pass_header' %} {% if action_data.fcgi_pass_header|default('') != '' %} {% do action_options.append('pass-header ' ~ action_data.fcgi_pass_header) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'fcgi_set_param' %} {% if action_data.fcgi_set_param|default('') != '' %} {% do action_options.append('set-param ' ~ action_data.fcgi_set_param) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'http-after-response' %} {% if action_data.http_after_response_action|default('') != '' %} @@ -508,7 +508,7 @@ {% endif %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'http-request' %} {% if action_data.http_request_action|default('') != '' %} @@ -528,7 +528,7 @@ {% do action_options.append('http-request ' ~ action_keyword_data) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'http-response' %} {% if action_data.http_response_action|default('') != '' %} @@ -546,7 +546,7 @@ {% do action_options.append('http-response ' ~ action_keyword_data) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'monitor_fail' %} {% if action_data.monitor_fail_uri|default("") != "" %} @@ -554,7 +554,7 @@ {% do action_options.append('monitor fail') %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'tcp-request' %} {% if action_data.tcp_request_action|default('') != '' %} @@ -574,7 +574,7 @@ {% do action_options.append('tcp-request ' ~ action_keyword_data) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'tcp-response' %} {% if action_data.tcp_response_action|default('') != '' %} @@ -592,7 +592,7 @@ {% do action_options.append('tcp-response ' ~ action_keyword_data) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'compression' %} {% set action_multiline = '1' %} @@ -622,18 +622,18 @@ {% endif %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% elif action_data.type == 'custom' %} {% if action_data.custom|default("") != "" %} {% do action_options.append(action_data.custom) %} {% else %} {% set action_enabled = '0' %} - # ERROR: missing parameters +{% do global_action_options.append('# ERROR: missing parameters') %} {% endif %} {% else %} {% set action_enabled = '0' %} - # ERROR: unsupported rule type +{% do global_action_options.append('# ERROR: unsupported rule type' ~ action_data.type) %} {% endif %} {# # Is this rule enabled in the GUI? #} {% if action_data.enabled|default('') == '1' %} @@ -664,14 +664,14 @@ {% do global_action_options.append(([action_options|join(join_char), acl_line]|join(' '))) %} {% endif %} {% else %} - # RULE INVALID: {{action_data.name}} +{% do global_action_options.append('# RULE INVALID: ' + action_data.name) %} {% endif %} {% else %} - # RULE DISABLED: {{action_data.name}} +{% do global_action_options.append('# RULE DISABLED: ' + action_data.name) %} {% endif %} {% else %} - # RULE INVALID: {{action_data.name}} - # CONDITIONS WITH ERRORS: {{acl_errors}} +{% do global_action_options.append('# RULE INVALID: ' + action_data.name) %} +{% do global_action_options.append('# CONDITIONS WITH ERRORS: ' + acl_errors) %} {% endif %} {% endfor %}