diff options
author | Alex W <embezzle.dev@proton.me> | 2024-05-21 23:25:06 +0100 |
---|---|---|
committer | Alex W <embezzle.dev@proton.me> | 2024-05-21 23:25:06 +0100 |
commit | e1450096b4c667a4c33a3fcd8f67ebf6a39d441d (patch) | |
tree | 5c503636e7e8a31176341f560dfdff9a17734b8e /interface-definitions | |
parent | bc345404b411ac066383e796936de704078787b2 (diff) | |
download | vyos-1x-e1450096b4c667a4c33a3fcd8f67ebf6a39d441d.tar.gz vyos-1x-e1450096b4c667a4c33a3fcd8f67ebf6a39d441d.zip |
reverse-proxy: T6370: Set custom HTTP headers in reverse-proxy responses
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/haproxy/http-response-headers.xml.i | 29 | ||||
-rw-r--r-- | interface-definitions/load-balancing_reverse-proxy.xml.in | 2 |
2 files changed, 31 insertions, 0 deletions
diff --git a/interface-definitions/include/haproxy/http-response-headers.xml.i b/interface-definitions/include/haproxy/http-response-headers.xml.i new file mode 100644 index 000000000..9e7ddfd28 --- /dev/null +++ b/interface-definitions/include/haproxy/http-response-headers.xml.i @@ -0,0 +1,29 @@ +<!-- include start from haproxy/http-response-headers.xml.i --> +<tagNode name="http-response-headers"> + <properties> + <help>Headers to include in HTTP response</help> + <valueHelp> + <format>txt</format> + <description>HTTP header name</description> + </valueHelp> + <constraint> + <regex>[-a-zA-Z]+</regex> + </constraint> + <constraintErrorMessage>Header names must only include alphabetical characters and hyphens</constraintErrorMessage> + </properties> + <children> + <leafNode name="value"> + <properties> + <help>HTTP header value</help> + <valueHelp> + <format>txt</format> + <description>HTTP header value</description> + </valueHelp> + <constraint> + <regex>[[:ascii:]]{1,256}</regex> + </constraint> + </properties> + </leafNode> + </children> +</tagNode> +<!-- include end --> diff --git a/interface-definitions/load-balancing_reverse-proxy.xml.in b/interface-definitions/load-balancing_reverse-proxy.xml.in index 6a3b3cef1..011e1b53c 100644 --- a/interface-definitions/load-balancing_reverse-proxy.xml.in +++ b/interface-definitions/load-balancing_reverse-proxy.xml.in @@ -39,6 +39,7 @@ #include <include/port-number.xml.i> #include <include/haproxy/rule-frontend.xml.i> #include <include/haproxy/tcp-request.xml.i> + #include <include/haproxy/http-response-headers.xml.i> <leafNode name="redirect-http-to-https"> <properties> <help>Redirect HTTP to HTTPS</help> @@ -90,6 +91,7 @@ </leafNode> #include <include/generic-description.xml.i> #include <include/haproxy/mode.xml.i> + #include <include/haproxy/http-response-headers.xml.i> <node name="parameters"> <properties> <help>Backend parameters</help> |