diff --git a/middleware.go b/middleware.go index 367bfae..4a80e8d 100644 --- a/middleware.go +++ b/middleware.go @@ -112,8 +112,8 @@ func NewWithConfig(logger *slog.Logger, config Config) echo.MiddlewareFunc { query := req.URL.RawQuery params := map[string]string{} - for i, k := range c.ParamNames() { - params[k] = c.ParamValues()[i] + for _, p := range c.PathParams() { + params[p.Name] = p.Value } // dump request body