From 4feac4d83cd758c95194090d4f3468373ee342ef Mon Sep 17 00:00:00 2001 From: Patrick Koenig Date: Fri, 6 Oct 2023 12:15:26 +0900 Subject: [PATCH] reverseproxy: Allow fallthrough for response handlers without routes (#5780) --- modules/caddyhttp/reverseproxy/reverseproxy.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index f11c8e33a..395530d9b 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -848,12 +848,6 @@ func (h *Handler) reverseProxy(rw http.ResponseWriter, req *http.Request, origRe break } - // otherwise, if there are any routes configured, execute those as the - // actual response instead of what we got from the proxy backend - if len(rh.Routes) == 0 { - continue - } - // set up the replacer so that parts of the original response can be // used for routing decisions for field, value := range res.Header {