From f639d5ea643f67ea87a9cdcc7231fe74f5387f8e Mon Sep 17 00:00:00 2001 From: David Delassus Date: Mon, 10 Jun 2024 15:06:24 +0200 Subject: [PATCH] :bug: do not prepend `/` --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8291e97..b6f2ad3 100644 --- a/main.go +++ b/main.go @@ -48,7 +48,10 @@ func (h *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { ) r.URL.Scheme = h.remote.Scheme r.URL.Host = h.remote.Host - r.URL.Path = h.remote.Path + r.URL.Path + + if h.remote.Path != "" && h.remote.Path != "/" { + r.URL.Path = h.remote.Path + r.URL.Path + } rule_ApiProjectsFix(r)