mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: support set-path in ACLs
This commit is contained in:
@@ -193,6 +193,17 @@
|
||||
<type>text</type>
|
||||
<help><![CDATA[This is suited for all header fields which are allowed to carry more than one value: Matches the specified regular expression against every comma-delimited value of the header field.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<label>Parameters</label>
|
||||
<type>header</type>
|
||||
<style>type_table table_http-request_set-path</style>
|
||||
</field>
|
||||
<field>
|
||||
<id>action.http_request_set_path</id>
|
||||
<label>Set Path</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Rewrites the request path. The query string, if any, is left intact. If a scheme and authority is found before the path, they are left intact as well.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<label>Parameters</label>
|
||||
<type>header</type>
|
||||
|
||||
@@ -1542,6 +1542,7 @@
|
||||
<http-request_del-header>http-request header delete</http-request_del-header>
|
||||
<http-request_replace-header>http-request header replace</http-request_replace-header>
|
||||
<http-request_replace-value>http-request header replace value</http-request_replace-value>
|
||||
<http-request_set-path>http-request set-path</http-request_set-path>
|
||||
<http-response_allow>http-response allow</http-response_allow>
|
||||
<http-response_deny>http-response deny</http-response_deny>
|
||||
<http-response_lua>http-response lua script</http-response_lua>
|
||||
@@ -1641,6 +1642,10 @@
|
||||
<mask>/^.{1,4096}$/u</mask>
|
||||
<Required>N</Required>
|
||||
</http_request_replace_value_regex>
|
||||
<http_request_set_path type="TextField">
|
||||
<mask>/^.{1,4096}$/u</mask>
|
||||
<Required>N</Required>
|
||||
</http_request_set_path>
|
||||
<http_response_lua type="TextField">
|
||||
<mask>/^.{1,4096}$/u</mask>
|
||||
<Required>N</Required>
|
||||
|
||||
@@ -374,6 +374,13 @@
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'http-request_set-path' %}
|
||||
{% if action_data.http_request_set_path|default("") != "" %}
|
||||
{% do action_options.append('http-request set-path ' ~ action_data.http_request_set_path) %}
|
||||
{% else %}
|
||||
{% set action_enabled = '0' %}
|
||||
# ERROR: missing parameters
|
||||
{% endif %}
|
||||
{% elif action_data.type == 'http-response_allow' %}
|
||||
{% do action_options.append('http-response allow') %}
|
||||
{% elif action_data.type == 'http-response_deny' %}
|
||||
|
||||
Reference in New Issue
Block a user