diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:35:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:35:11 +0000 |
commit | da76459dc21b5af2449af2d36eb95226cb186ce2 (patch) | |
tree | 542ebb3c1e796fac2742495b8437331727bbbfa0 /tests/conf/test-redirect.cfg | |
parent | Initial commit. (diff) | |
download | haproxy-upstream/2.6.12.tar.xz haproxy-upstream/2.6.12.zip |
Adding upstream version 2.6.12.upstream/2.6.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/conf/test-redirect.cfg')
-rw-r--r-- | tests/conf/test-redirect.cfg | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/conf/test-redirect.cfg b/tests/conf/test-redirect.cfg new file mode 100644 index 0000000..582a069 --- /dev/null +++ b/tests/conf/test-redirect.cfg @@ -0,0 +1,49 @@ +# This is a test configuration. +# It is used to check the redirect keyword. + +global + maxconn 400 + stats timeout 3s + +listen sample1 + mode http + retries 1 + option redispatch + timeout client 1m + timeout connect 5s + timeout server 1m + maxconn 400 + bind :8000 + + acl url_test1 url_reg test1 + acl url_test2 url_reg test2 + acl url_test3 url_reg test3 + acl url_test4 url_reg test4 + + acl seen hdr_sub(cookie) SEEN=1 + + redirect location /abs/test code 301 if url_test1 + redirect prefix /pfx/test code 302 if url_test2 + redirect prefix /pfx/test code 303 drop-query if url_test3 + + redirect prefix / code 302 set-cookie SEEN=1 if url_test4 !seen + redirect location / code 302 clear-cookie SEEN= if url_test4 seen + + ### unconditional redirection + #redirect location https://example.com/ if TRUE + + ### parser must detect invalid syntaxes below + #redirect + #redirect blah + #redirect location + #redirect location /abs/test + #redirect location /abs/test code + #redirect location /abs/test code 300 + #redirect location /abs/test code 301 + #redirect location /abs/test code 304 + + balance roundrobin + server act1 127.0.0.1:80 weight 10 + option httpclose + stats uri /stats + stats refresh 5000ms |