From 87a1f228b4c48db7bdab694cf0fd1c76243f29f3 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 1 Mar 2022 16:12:43 -0500 Subject: reverseproxy: Move status replacement intercept to `replace_status` (#4300) --- .../reverse_proxy_handle_response.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'caddytest/integration') diff --git a/caddytest/integration/caddyfile_adapt/reverse_proxy_handle_response.txt b/caddytest/integration/caddyfile_adapt/reverse_proxy_handle_response.txt index 35d9631..88ecbc2 100644 --- a/caddytest/integration/caddyfile_adapt/reverse_proxy_handle_response.txt +++ b/caddytest/integration/caddyfile_adapt/reverse_proxy_handle_response.txt @@ -1,6 +1,9 @@ :8884 reverse_proxy 127.0.0.1:65535 { + @changeStatus status 500 + replace_status @changeStatus 400 + @accel header X-Accel-Redirect * handle_response @accel { respond "Header X-Accel-Redirect!" @@ -38,9 +41,6 @@ reverse_proxy 127.0.0.1:65535 { handle_response @multi { respond "Headers Foo, Bar AND statuses 401, 403 and 404!" } - - @changeStatus status 500 - handle_response @changeStatus 400 } ---------- { @@ -56,6 +56,14 @@ reverse_proxy 127.0.0.1:65535 { "handle": [ { "handle_response": [ + { + "match": { + "status_code": [ + 500 + ] + }, + "status_code": 400 + }, { "match": { "headers": { @@ -155,14 +163,6 @@ reverse_proxy 127.0.0.1:65535 { } ] }, - { - "match": { - "status_code": [ - 500 - ] - }, - "status_code": 400 - }, { "routes": [ { -- cgit v1.2.3