Fix chi routing rawpath

This commit is contained in:
Jan-Lukas Else 2020-11-10 16:40:22 +01:00
parent fa3242917b
commit 5a284ab286
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}