From 5a284ab286347734e716521a2d33eae545ee9990 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Tue, 10 Nov 2020 16:40:22 +0100 Subject: [PATCH] Fix chi routing rawpath --- http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http.go b/http.go index 088418f..2d77d2c 100644 --- a/http.go +++ b/http.go @@ -294,5 +294,8 @@ func (d *dynamicHandler) swapHandler(h http.Handler) { } func (d *dynamicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + // Fix to use Path routing instead of RawPath routing in Chi + r.URL.RawPath = "" + // Serve request d.realHandler.Load().(http.Handler).ServeHTTP(w, r) }