From 32bc29269ee50398dc56860e6ac9bf32b9deb1d2 Mon Sep 17 00:00:00 2001 From: Ronni Skansing Date: Mon, 30 Mar 2026 21:56:12 +0200 Subject: [PATCH] fix proxy normalize empty path to / Signed-off-by: Ronni Skansing --- backend/proxy/proxy.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/proxy/proxy.go b/backend/proxy/proxy.go index 17ccc7f..0e40133 100644 --- a/backend/proxy/proxy.go +++ b/backend/proxy/proxy.go @@ -1641,7 +1641,12 @@ func (m *ProxyHandler) matchesPath(capture service.ProxyServiceCaptureRule, req if capture.PathRe == nil { return true } - return capture.PathRe.MatchString(req.URL.Path) + // normalize empty path to "/" so rules like path: / match root requests + path := req.URL.Path + if path == "" { + path = "/" + } + return capture.PathRe.MatchString(path) } func (m *ProxyHandler) handlePathBasedCapture(capture service.ProxyServiceCaptureRule, session *service.ProxySession, resp *http.Response) {